- Sort Score
- Result 10 results
- Languages All
Results 21 - 30 of 207 for NewReader (0.06 sec)
-
internal/config/policy/opa/config.go
CloseRespFn func(r io.ReadCloser) `json:"-"` } // Validate - validate opa configuration params. func (a *Args) Validate() error { req, err := http.NewRequest(http.MethodPost, a.URL.String(), bytes.NewReader([]byte(""))) if err != nil { return err } req.Header.Set("Content-Type", "application/json") if a.AuthToken != "" { req.Header.Set("Authorization", a.AuthToken) }
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Wed Jul 10 20:16:44 UTC 2024 - 5.3K bytes - Viewed (0) -
cmd/metacache_gen_test.go
} vn := metacache{} err := msgp.Decode(&buf, &vn) if err != nil { t.Error(err) } buf.Reset() msgp.Encode(&buf, &v) err = msgp.NewReader(&buf).Skip() if err != nil { t.Error(err) } } func BenchmarkEncodemetacache(b *testing.B) { v := metacache{} var buf bytes.Buffer msgp.Encode(&buf, &v) b.SetBytes(int64(buf.Len()))
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Fri Apr 23 18:58:53 UTC 2021 - 2.3K bytes - Viewed (0) -
internal/dsync/lock-args_gen_test.go
} vn := LockArgs{} err := msgp.Decode(&buf, &vn) if err != nil { t.Error(err) } buf.Reset() msgp.Encode(&buf, &v) err = msgp.NewReader(&buf).Skip() if err != nil { t.Error(err) } } func BenchmarkEncodeLockArgs(b *testing.B) { v := LockArgs{} var buf bytes.Buffer msgp.Encode(&buf, &v) b.SetBytes(int64(buf.Len()))
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Tue Nov 21 01:09:35 UTC 2023 - 4.4K bytes - Viewed (0) -
src/bytes/reader_test.go
var with, withOut nErr with.n, with.err = io.Copy(discard, NewReader(nil)) withOut.n, withOut.err = io.Copy(discard, justReader{NewReader(nil)}) if with != withOut { t.Errorf("behavior differs: with = %#v; without: %#v", with, withOut) } } // tests that Len is affected by reads, but Size is not. func TestReaderLenSize(t *testing.T) { r := NewReader([]byte("abc")) io.CopyN(io.Discard, r, 1) if r.Len() != 2 {
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Mon Dec 13 18:45:54 UTC 2021 - 8K bytes - Viewed (0) -
internal/s3select/json/reader_test.go
t.Fatal(err) } for _, file := range files { t.Run(file.Name(), func(t *testing.T) { f, err := os.Open(filepath.Join("testdata", file.Name())) if err != nil { t.Fatal(err) } r := NewReader(f, &ReaderArgs{}) var record sql.Record for { record, err = r.Read(record) if err != nil { break } } r.Close() if err != io.EOF {
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Mon Sep 19 18:05:16 UTC 2022 - 2.5K bytes - Viewed (0) -
cmd/bucket-policy-handlers_test.go
var expectedPolicy *policy.BucketPolicy expectedPolicy, err = policy.ParseBucketPolicyConfig(strings.NewReader(expectedBucketPolicyStr), testCase.bucketName) if err != nil { t.Fatalf("unexpected error. %v", err) } var gotPolicy *policy.BucketPolicy gotPolicy, err = policy.ParseBucketPolicyConfig(bytes.NewReader(bucketPolicyReadBuf), testCase.bucketName) if err != nil { t.Fatalf("unexpected error. %v", err)
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Mon Jun 10 15:50:49 UTC 2024 - 32.9K bytes - Viewed (0) -
src/cmd/addr2line/addr2line_test.go
out, err := cmd.CombinedOutput() if err != nil { t.Fatalf("%v: %v\n%s", cmd, err, string(out)) } syms := make(map[string]string) scanner := bufio.NewScanner(bytes.NewReader(out)) for scanner.Scan() { f := strings.Fields(scanner.Text()) if len(f) < 3 { continue } syms[f[2]] = f[0] } if err := scanner.Err(); err != nil { t.Fatalf("error reading symbols: %v", err)
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Fri Sep 06 13:23:48 UTC 2024 - 3.2K bytes - Viewed (0) -
internal/s3select/progress.go
zr, err := zstd.NewReader(scannedReader, zstd.WithDecoderConcurrency(2), zstd.WithDecoderMaxWindow(64<<20)) if err != nil { return nil, errInvalidCompression(err, compType) } r = zr pr.closer = zr.IOReadCloser() case lz4Type: r = lz4.NewReader(scannedReader) case s2Type: r = s2.NewReader(scannedReader) case snappyType: r = s2.NewReader(scannedReader, s2.ReaderMaxBlockSize(64<<10))
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Sun Sep 22 00:33:43 UTC 2024 - 4.3K bytes - Viewed (0) -
cmd/admin-bucket-handlers.go
return } data, err := io.ReadAll(r.Body) if err != nil { writeErrorResponseJSON(ctx, w, errorCodes.ToAPIErr(ErrInvalidRequest), r.URL) return } reader := bytes.NewReader(data) zr, err := zip.NewReader(reader, int64(len(data))) if err != nil { writeErrorResponseJSON(ctx, w, errorCodes.ToAPIErr(ErrInvalidRequest), r.URL) return } rpt := importMetaReport{ madmin.BucketMetaImportErrs{
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Wed Aug 28 15:32:18 UTC 2024 - 33.2K bytes - Viewed (0) -
src/archive/zip/reader_test.go
// 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 { copy(b[i:i+4], sig) } _, err = NewReader(bytes.NewReader(b), size) if err != ErrFormat {
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Thu Jul 25 00:25:45 UTC 2024 - 55.6K bytes - Viewed (0)