- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 13 for fake (0.14 sec)
-
src/bytes/buffer_test.go
} rlen := rand.Intn(len(testString)) fub := make([]byte, rlen) n, _ := buf.Read(fub) s = s[n:] } empty(t, "TestMixedReadsAndWrites (2)", &buf, s, make([]byte, buf.Len())) } func TestCapWithPreallocatedSlice(t *testing.T) { buf := NewBuffer(make([]byte, 10)) n := buf.Cap() if n != 10 { t.Errorf("expected 10, got %d", n) } }
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) -
doc/go1.17_spec.html
Call Type T Result make(T, n) slice slice of type T with length n and capacity n make(T, n, m) slice slice of type T with length n and capacity m make(T) map map of type T make(T, n) map map of type T with initial space for approximately n elements make(T) channel unbuffered channel of type T
HTML - Registered: Tue May 07 11:14:38 GMT 2024 - Last Modified: Thu Apr 11 20:22:45 GMT 2024 - 211.6K bytes - Viewed (0) -
src/archive/zip/reader_test.go
} } func TestInvalidFiles(t *testing.T) { const size = 1024 * 70 // 70kb b := make([]byte, size) // zeroes _, err := NewReader(bytes.NewReader(b), size) if err != ErrFormat { t.Errorf("zeroes: error=%v, want %v", err, ErrFormat) } // repeated directoryEndSignatures sig := make([]byte, 4) binary.LittleEndian.PutUint32(sig, directoryEndSignature) for i := 0; i < size-4; i += 4 {
Go - Registered: Tue Apr 30 11:13:12 GMT 2024 - Last Modified: Wed Mar 27 18:23:49 GMT 2024 - 55.3K bytes - Viewed (0) -
src/cmd/cgo/doc.go
forth). A Go function called by C code may take C pointers as arguments, and it may store non-pointer data, C pointers, or Go pointers to pinned memory through those pointers. It may not store a Go pointer to unpinned memory in memory pointed to by a C pointer (which again, implies that it may not store a string, slice, channel, and so forth). A Go function called by C code may take a Go pointer but it must preserve the property
Go - Registered: Tue Apr 30 11:13:12 GMT 2024 - Last Modified: Sun Mar 31 09:02:45 GMT 2024 - 42.1K bytes - Viewed (0) -
src/archive/tar/reader.go
var paxHdrs map[string]string var gnuLongName, gnuLongLink string // Externally, Next iterates through the tar archive as if it is a series of // files. Internally, the tar format often uses fake "files" to add meta // data that describes the next file. These meta data "files" should not // normally be visible to the outside. As such, this loop iterates through // one or more "header files" until it finds a "normal file".
Go - Registered: Tue Apr 30 11:13:12 GMT 2024 - Last Modified: Fri Mar 08 01:59:14 GMT 2024 - 26.8K bytes - Viewed (0) -
src/bytes/bytes.go
// up to a maximum of n byte slices. Invalid UTF-8 sequences are chopped into individual bytes. func explode(s []byte, n int) [][]byte { if n <= 0 || n > len(s) { n = len(s) } a := make([][]byte, n) var size int na := 0 for len(s) > 0 { if na+1 >= n { a[na] = s na++ break } _, size = utf8.DecodeRune(s) a[na] = s[0:size:size] s = s[size:] na++ }
Go - Registered: Tue Apr 30 11:13:12 GMT 2024 - Last Modified: Mon Feb 19 19:51:15 GMT 2024 - 33.8K bytes - Viewed (0) -
src/archive/zip/zip_test.go
} } if err := w.Close(); err != nil { t.Fatal(err) } } } // 16k-1 records shouldn't make a zip64: t.Run("uint16max-1_NoZip64", func(t *testing.T) { t.Parallel() if generatesZip64(t, gen(0xfffe)) { t.Error("unexpected zip64") } }) // 16k records should make a zip64: t.Run("uint16max_Zip64", func(t *testing.T) { t.Parallel() if !generatesZip64(t, gen(0xffff)) {
Go - Registered: Tue Apr 30 11:13:12 GMT 2024 - Last Modified: Wed Mar 27 18:23:49 GMT 2024 - 19.5K bytes - Viewed (0) -
doc/go_spec.html
Call Core type Result make(T, n) slice slice of type T with length n and capacity n make(T, n, m) slice slice of type T with length n and capacity m make(T) map map of type T make(T, n) map map of type T with initial space for approximately n elements make(T) channel unbuffered channel of type T
HTML - Registered: Tue May 07 11:14:38 GMT 2024 - Last Modified: Thu May 02 22:43:51 GMT 2024 - 279.6K bytes - Viewed (0) -
doc/next/6-stdlib/2-unique.md
### New unique package The new [unique](/pkg/unique) package provides facilities for canonicalizing values (like "interning" or "hash-consing"). Any value of comparable type may be canonicalized with the new `Make[T]` function, which produces a reference to a canonical copy of the value in the form of a `Handle[T]`. Two `Handle[T]` are equal if and only if the values used to produce the handles are equal, allowing programs to deduplicate values and reduce
Plain Text - Registered: Tue May 07 11:14:38 GMT 2024 - Last Modified: Wed Apr 24 13:37:36 GMT 2024 - 579 bytes - Viewed (0) -
src/builtin/builtin.go
// constant. See the Go language specification's "Length and capacity" section for // details. func cap(v Type) int // The make built-in function allocates and initializes an object of type // slice, map, or chan (only). Like new, the first argument is a type, not a // value. Unlike new, make's return type is the same as the type of its // argument, not a pointer to it. The specification of the result depends on // the type: //
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)