- Sort Score
- Result 10 results
- Languages All
Results 91 - 100 of 208 for newReader (0.07 sec)
-
cmd/storage-datatypes_test.go
func BenchmarkDecodeVolInfoMsgp(b *testing.B) { v := VolInfo{ Name: "uuid", Created: time.Now(), } var buf bytes.Buffer msgp.Encode(&buf, &v) rd := msgp.NewEndlessReader(buf.Bytes(), b) dc := msgp.NewReader(rd) b.Log("Size:", buf.Len(), "bytes") b.SetBytes(1) b.ReportAllocs() b.ResetTimer() for i := 0; i < b.N; i++ { err := v.DecodeMsg(dc) if err != nil { b.Fatal(err) } } }
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Mon Sep 19 18:05:16 UTC 2022 - 9.4K bytes - Viewed (0) -
docs/debugging/inspect/export.go
case 0: _, e = msgp.CopyToJSON(buf, bytes.NewReader(b)) if e != nil { return nil, e } case 1, 2: v, b, e := msgp.ReadBytesZC(b) if e != nil { return nil, e } if _, nbuf, e := msgp.ReadUint32Bytes(b); e == nil { // Read metadata CRC (added in v2, ignore if not found) b = nbuf } _, e = msgp.CopyToJSON(buf, bytes.NewReader(v)) if e != nil { return nil, e }
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Tue Nov 08 15:58:02 UTC 2022 - 9.1K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/io/CharSinkTest.java
assertThrows(IOException.class, () -> failSource.copyTo(okSink)); // ensure writer was closed IF it was opened (depends on implementation whether or not it's // opened at all if source.newReader() throws). assertTrue( "stream not closed when copying from source with option: " + option, !okSink.wasStreamOpened() || okSink.wasStreamClosed()); } }
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Thu Oct 31 14:20:11 UTC 2024 - 4.5K bytes - Viewed (0) -
src/archive/zip/zip_test.go
t.Fatalf("creating file %d: %v", i, err) } } if err := w.Close(); err != nil { t.Fatalf("Writer.Close: %v", err) } s := buf.String() zr, err := NewReader(strings.NewReader(s), int64(len(s))) if err != nil { t.Fatalf("NewReader: %v", err) } if got := len(zr.File); got != nFiles { t.Fatalf("File contains %d files, want %d", got, nFiles) } for i := 0; i < nFiles; i++ {
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Thu May 23 01:00:11 UTC 2024 - 19.6K bytes - Viewed (0) -
cmd/object-api-utils_test.go
rec := httptest.NewRecorder() // construct HTTP request for Get Object end point. req, err := newTestSignedRequestV4(http.MethodPut, getPutObjectURL("", bucketName, objectName), int64(5), bytes.NewReader([]byte("hello")), credentials.AccessKey, credentials.SecretKey, map[string]string{}) if err != nil { t.Fatalf("failed to create HTTP request for Put Object: <ERROR> %v", err) }
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Thu Aug 08 15:29:58 UTC 2024 - 24.1K bytes - Viewed (0) -
cmd/data-scanner_test.go
</LifecycleConfiguration>` deleteAllLc, err := lifecycle.ParseLifecycleConfig(strings.NewReader(deleteAllILM)) if err != nil { t.Fatalf("Failed to parse deleteAllILM test ILM policy %v", err) } delMarkerLc, err := lifecycle.ParseLifecycleConfig(strings.NewReader(delMarkerILM)) if err != nil { t.Fatalf("Failed to parse delMarkerILM test ILM policy %v", err) } tests := []struct {
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Fri May 03 11:18:58 UTC 2024 - 6.9K bytes - Viewed (0) -
internal/bucket/encryption/bucket-sse-config_test.go
expectedErr: errors.New("MasterKeyID contains unsupported characters"), shouldPass: false, }, } for i, tc := range testCases { ssec, err := ParseBucketSSEConfig(bytes.NewReader([]byte(tc.inputXML))) if tc.shouldPass && err != nil { t.Errorf("Test case %d: Expected to succeed but got %s", i+1, err) } if !tc.shouldPass {
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Tue Aug 16 18:28:30 UTC 2022 - 6.1K bytes - Viewed (0) -
cmd/erasure-encode_test.go
} writers[i] = newBitrotWriter(disk, "", "testbucket", "object", erasure.ShardFileSize(int64(len(data[test.offset:]))), test.algorithm, erasure.ShardSize()) } n, err := erasure.Encode(context.Background(), bytes.NewReader(data[test.offset:]), writers, buffer, erasure.dataBlocks+1) closeBitrotWriters(writers) if err != nil && !test.shouldFail { t.Errorf("Test %d: should pass but failed with: %v", i, err) }
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Tue Jan 30 20:43:25 UTC 2024 - 11.9K bytes - Viewed (0) -
cmd/bucket-encryption_test.go
</Rule> </ServerSideEncryptionConfiguration>`, expectedErr: nil, shouldPass: true, }, } for i, tc := range testCases { _, err := validateBucketSSEConfig(bytes.NewReader([]byte(tc.inputXML))) if tc.shouldPass && err != nil { t.Fatalf("Test case %d: Expected to succeed but got %s", i+1, err) } if !tc.shouldPass {
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Fri May 14 07:59:05 UTC 2021 - 2.1K bytes - Viewed (0) -
cmd/admin-handlers-site-replication.go
case madmin.SRIAMItemPolicy: if item.Policy == nil { err = globalSiteReplicationSys.PeerAddPolicyHandler(ctx, item.Name, nil, item.UpdatedAt) } else { policy, perr := policy.ParseConfig(bytes.NewReader(item.Policy)) if perr != nil { writeErrorResponseJSON(ctx, w, toAdminAPIErr(ctx, perr), r.URL) return } if policy.IsEmpty() {
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Fri May 24 23:05:23 UTC 2024 - 19.4K bytes - Viewed (0)