- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 29 for caps (0.23 sec)
-
src/bytes/buffer_test.go
buf := make([]byte, 1024) b.Write(buf[0:1]) var cap0 int for i := 0; i < 5<<10; i++ { b.Write(buf) b.Read(buf) if i == 0 { cap0 = b.Cap() } } cap1 := b.Cap() // (*Buffer).grow allows for 2x capacity slop before sliding, // so set our error threshold at 3x. if cap1 > cap0*3 { t.Errorf("buffer cap = %d; too big (grew from %d)", cap1, cap0) } }
Go - Registered: Tue Apr 30 11:13:12 GMT 2024 - Last Modified: Fri Apr 26 13:31:36 GMT 2024 - 18.6K bytes - Viewed (0) -
src/arena/arena.go
// not be used after the arena is freed. Accessing the underlying storage of the // slice after free may result in a fault, but this fault is also not guaranteed. func MakeSlice[T any](a *Arena, len, cap int) []T { var sl []T runtime_arena_arena_Slice(a.a, &sl, cap) return sl[:len] } // Clone makes a shallow copy of the input value that is no longer bound to any // arena it may have been allocated from, returning the copy. If it was not
Go - Registered: Tue Apr 30 11:13:12 GMT 2024 - Last Modified: Wed Oct 12 20:23:36 GMT 2022 - 4.3K bytes - Viewed (0) -
doc/go1.17_spec.html
</p> <pre> s := make([]int, 10, 100) // slice with len(s) == 10, cap(s) == 100 s := make([]int, 1e3) // slice with len(s) == cap(s) == 1000 s := make([]int, 1<<63) // illegal: len(s) is not representable by a value of type int s := make([]int, 10, 0) // illegal: len(s) > cap(s) c := make(chan int, 10) // channel with a buffer size of 10
HTML - Registered: Tue Apr 30 11:13:12 GMT 2024 - Last Modified: Thu Apr 11 20:22:45 GMT 2024 - 211.6K bytes - Viewed (0) -
src/bufio/bufio_test.go
// Obtain a buffer to append to. b := w.AvailableBuffer() if w.Available() != cap(b) { t.Fatalf("Available() = %v, want %v", w.Available(), cap(b)) } // While not recommended, it is valid to append to a shifted buffer. // This forces Write to copy the input. if rn.Intn(8) == 0 && cap(b) > 0 { b = b[1:1:cap(b)] } // Append a random integer of varying width.
Go - Registered: Tue Apr 30 11:13:12 GMT 2024 - Last Modified: Fri Feb 10 18:56:01 GMT 2023 - 51.5K bytes - Viewed (0) -
api/go1.3.txt
pkg syscall (freebsd-arm), const SYS_ACCEPT4 ideal-int pkg syscall (freebsd-arm), const SYS_BINDAT = 538 pkg syscall (freebsd-arm), const SYS_BINDAT ideal-int pkg syscall (freebsd-arm), const SYS_CAP_GETRIGHTS = 515 pkg syscall (freebsd-arm), const SYS_CAP_GETRIGHTS ideal-int pkg syscall (freebsd-arm), const SYS_CHFLAGSAT = 540 pkg syscall (freebsd-arm), const SYS_CHFLAGSAT ideal-int pkg syscall (freebsd-arm), const SYS_CONNECTAT = 539
Plain Text - Registered: Tue Apr 30 11:13:12 GMT 2024 - Last Modified: Mon Jun 02 02:45:00 GMT 2014 - 117K bytes - Viewed (0) -
api/go1.5.txt
pkg bufio, method (*Reader) Discard(int) (int, error) pkg bufio, method (ReadWriter) Discard(int) (int, error) pkg bytes, func LastIndexByte([]uint8, uint8) int pkg bytes, method (*Buffer) Cap() int pkg bytes, method (*Reader) Size() int64 pkg crypto, const SHA512_224 = 14 pkg crypto, const SHA512_224 Hash pkg crypto, const SHA512_256 = 15 pkg crypto, const SHA512_256 Hash
Plain Text - Registered: Tue Apr 30 11:13:12 GMT 2024 - Last Modified: Thu Jul 30 21:14:09 GMT 2015 - 46.6K bytes - Viewed (0) -
api/go1.13.txt
pkg syscall (netbsd-arm64-cgo), const DLT_IEEE802_15_4_NONASK_PHY ideal-int pkg syscall (netbsd-arm64-cgo), const DLT_IEEE802_16_MAC_CPS = 188 pkg syscall (netbsd-arm64-cgo), const DLT_IEEE802_16_MAC_CPS ideal-int pkg syscall (netbsd-arm64-cgo), const DLT_IEEE802_16_MAC_CPS_RADIO = 193 pkg syscall (netbsd-arm64-cgo), const DLT_IEEE802_16_MAC_CPS_RADIO ideal-int pkg syscall (netbsd-arm64-cgo), const DLT_IEEE802 = 6
Plain Text - Registered: Tue Apr 30 11:13:12 GMT 2024 - Last Modified: Thu Aug 08 18:44:16 GMT 2019 - 452.6K bytes - Viewed (0) -
src/builtin/builtin.go
// number c. The return value will be floating point type corresponding to // the type of c. func imag(c ComplexType) FloatType // The clear built-in function clears maps and slices. // For maps, clear deletes all entries, resulting in an empty map. // For slices, clear sets all elements up to the length of the slice // to the zero value of the respective element type. If the argument
Go - Registered: Tue Apr 30 11:13:12 GMT 2024 - Last Modified: Thu Apr 11 20:22:45 GMT 2024 - 12.7K bytes - Viewed (0) -
doc/next/6-stdlib/1-time.md
prepared before that call will be sent or received after the call. Earlier versions of Go used channels with a one-element buffer, making it difficult to use `Reset` and `Stop` correctly. A visible effect of this change is that `len` and `cap` of timer channels now returns 0 instead of 1, which may affect programs that poll the length to decide whether a receive on the timer channel will succeed. Such code should use a non-blocking receive instead.
Plain Text - Registered: Tue Apr 30 11:13:12 GMT 2024 - Last Modified: Fri Apr 12 20:57:18 GMT 2024 - 1.5K bytes - Viewed (0) -
doc/go_spec.html
</p> <pre> s := make([]int, 10, 100) // slice with len(s) == 10, cap(s) == 100 s := make([]int, 1e3) // slice with len(s) == cap(s) == 1000 s := make([]int, 1<<63) // illegal: len(s) is not representable by a value of type int s := make([]int, 10, 0) // illegal: len(s) > cap(s) c := make(chan int, 10) // channel with a buffer size of 10
HTML - Registered: Tue Apr 30 11:13:12 GMT 2024 - Last Modified: Fri Apr 26 00:39:16 GMT 2024 - 279.6K bytes - Viewed (0)