- Sort Score
- Result 10 results
- Languages All
Results 1 - 9 of 9 for b2 (0.14 sec)
-
src/bytes/compare_test.go
b1 := []byte("Hello Gophers!") b2 := []byte("Hello Gophers!") for i := 0; i < b.N; i++ { if Compare(b1, b2) != 0 { b.Fatal("b1 != b2") } } } func BenchmarkCompareBytesToNil(b *testing.B) { b1 := []byte("Hello Gophers!") var b2 []byte for i := 0; i < b.N; i++ { if Compare(b1, b2) != 1 { b.Fatal("b1 > b2 failed") } } }
Go - Registered: Tue Apr 30 11:13:12 GMT 2024 - Last Modified: Thu Jul 13 23:11:42 GMT 2023 - 6.8K bytes - Viewed (0) -
cmd/bitrot.go
func (a BitrotAlgorithm) New() hash.Hash { switch a { case SHA256: return sha256.New() case BLAKE2b512: b2, _ := blake2b.New512(nil) // New512 never returns an error if the key is nil return b2 case HighwayHash256: hh, _ := highwayhash.New(magicHighwayHash256Key) // New will never return error since key is 256 bit return hh case HighwayHash256S:
Go - Registered: Sun May 05 19:28:20 GMT 2024 - Last Modified: Tue Jan 30 20:43:25 GMT 2024 - 7.6K bytes - Viewed (0) -
docs/debugging/xl-meta/main.go
b, _ := json.Marshal(file.Name) b2, err := decode(r, file.Name) if err != nil { return err } var tmp map[string]interface{} if err := json.Unmarshal(b2, &tmp); err == nil { if b3, err := json.Marshal(tmp); err == nil { b2 = b3 } } toPrint = append(toPrint, fmt.Sprintf("\t%s: %s", string(b), string(b2))) } } } else {
Go - Registered: Sun May 05 19:28:20 GMT 2024 - Last Modified: Wed Apr 24 17:56:22 GMT 2024 - 20.2K bytes - Viewed (1) -
src/archive/zip/reader.go
*b = (*b)[4:] return v } func (b *readBuf) uint64() uint64 { v := binary.LittleEndian.Uint64(*b) *b = (*b)[8:] return v } func (b *readBuf) sub(n int) readBuf { b2 := (*b)[:n] *b = (*b)[n:] return b2 } // A fileListEntry is a File and its ename. // If file == nil, the fileListEntry describes a directory without metadata. type fileListEntry struct { name string file *File
Go - Registered: Tue Apr 30 11:13:12 GMT 2024 - Last Modified: Fri Oct 13 18:36:46 GMT 2023 - 27.7K bytes - Viewed (0) -
cmd/dummy-data-generator_test.go
func cmpReaders(r1, r2 io.Reader) (bool, string) { bufLen := 32 * 1024 b1, b2 := make([]byte, bufLen), make([]byte, bufLen) for i := 0; true; i++ { n1, e1 := io.ReadFull(r1, b1) n2, e2 := io.ReadFull(r2, b2) if n1 != n2 { return false, fmt.Sprintf("Read %d != %d bytes from the readers", n1, n2) } if !bytes.Equal(b1[:n1], b2[:n2]) {
Go - Registered: Sun May 05 19:28:20 GMT 2024 - Last Modified: Mon Sep 19 18:05:16 GMT 2022 - 4.8K bytes - Viewed (0) -
src/bytes/buffer.go
if c < 2*cap(b) { // The growth rate has historically always been 2x. In the future, // we could rely purely on append to determine the growth rate. c = 2 * cap(b) } b2 := append([]byte(nil), make([]byte, c)...) copy(b2, b) return b2[:len(b)] } // WriteTo writes data to w until the buffer is drained or an error occurs. // The return value n is the number of bytes written; it always fits into an
Go - Registered: Tue Apr 30 11:13:12 GMT 2024 - Last Modified: Fri Oct 13 17:10:31 GMT 2023 - 15.7K bytes - Viewed (0) -
internal/s3select/csv/reader_contrib_test.go
Go - Registered: Sun May 05 19:28:20 GMT 2024 - Last Modified: Mon Sep 19 18:05:16 GMT 2022 - 38.5K bytes - Viewed (0) -
src/bufio/bufio_test.go
if err = r.UnreadByte(); err != nil { t.Fatal("unexpected error on UnreadByte:", err) } b2, err := r.ReadByte() if err != nil { t.Fatal("unexpected error reading after unreading:", err) } if b1 != b2 { t.Fatalf("incorrect byte after unread: got %q, want %q", b1, b2) } } if got != want { t.Errorf("got %q, want %q", got, want) } }
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) -
src/archive/zip/reader_test.go
0000020 67 67 65 72 2e 7a 69 70 ec dc 6b 4c 53 67 18 07 0000030 f0 16 c5 ca 65 2e cb b8 94 20 61 1f 44 33 c7 cd 0000040 c0 86 4a b5 c0 62 8a 61 05 c6 cd 91 b2 54 8c 1b 0000050 63 8b 03 9c 1b 95 52 5a e3 a0 19 6c b2 05 59 44 0000060 64 9d 73 83 71 11 46 61 14 b9 1d 14 09 4a c3 60 0000070 2e 4c 6e a5 60 45 02 62 81 95 b6 94 9e 9e 77 e7 0000080 d0 43 b6 f8 71 df 96 3c e7 a4 69 ce bf cf e9 79
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)