- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 26 for NopCloser (0.18 sec)
-
src/archive/zip/register.go
) func init() { compressors.Store(Store, Compressor(func(w io.Writer) (io.WriteCloser, error) { return &nopCloser{w}, nil })) compressors.Store(Deflate, Compressor(func(w io.Writer) (io.WriteCloser, error) { return newFlateWriter(w), nil })) decompressors.Store(Store, Decompressor(io.NopCloser)) decompressors.Store(Deflate, Decompressor(newFlateReader)) }
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Fri Oct 13 18:36:46 UTC 2023 - 3.7K bytes - Viewed (0) -
cmd/handler-utils_test.go
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Thu Feb 22 06:26:06 UTC 2024 - 6.1K bytes - Viewed (0) -
cmd/bitrot-streaming.go
// The output is written to the supplied writer w. func newStreamingBitrotWriterBuffer(w io.Writer, algo BitrotAlgorithm, shardSize int64) io.Writer { return &streamingBitrotWriter{iow: ioutil.NopCloser(w), h: algo.New(), shardSize: shardSize, canClose: nil, closeWithErr: func(err error) {}} } // Returns streaming bitrot writer implementation.
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Wed Aug 21 12:20:54 UTC 2024 - 6K bytes - Viewed (0) -
internal/ioutil/ioutil.go
return &LimitWriter{w, skipBytes, limit} } type nopCloser struct { io.Writer } func (nopCloser) Close() error { return nil } // NopCloser returns a WriteCloser with a no-op Close method wrapping // the provided Writer w. func NopCloser(w io.Writer) io.WriteCloser { return nopCloser{w} } const copyBufferSize = 32 * 1024 var copyBufPool = sync.Pool{
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Fri Jul 26 12:55:01 UTC 2024 - 10.9K bytes - Viewed (0) -
internal/s3select/csv/reader_contrib_test.go
} f := openTestFile(b, "nyc-taxi-data-100k.csv") r, err := NewReader(io.NopCloser(bytes.NewBuffer(f)), &args) if err != nil { b.Fatalf("Reading init failed with %s", err) } defer r.Close() b.ReportAllocs() b.ResetTimer() b.SetBytes(int64(len(f))) var record sql.Record for i := 0; i < b.N; i++ { r, err = NewReader(io.NopCloser(bytes.NewBuffer(f)), &args) if err != nil {
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Mon Sep 19 18:05:16 UTC 2022 - 38.5K bytes - Viewed (0) -
internal/s3select/json/preader_test.go
if err != nil { b.Fatal(err) } b.SetBytes(int64(len(f))) b.ReportAllocs() b.ResetTimer() var record sql.Record for i := 0; i < b.N; i++ { r := NewPReader(io.NopCloser(bytes.NewBuffer(f)), &ReaderArgs{}) 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) -
internal/s3select/json/reader_test.go
if err != nil { b.Fatal(err) } b.SetBytes(int64(len(f))) b.ReportAllocs() b.ResetTimer() var record sql.Record for i := 0; i < b.N; i++ { r := NewReader(io.NopCloser(bytes.NewBuffer(f)), &ReaderArgs{}) 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/auth-handler_test.go
return len(b), nil } // Test get request auth type. func TestGetRequestAuthType(t *testing.T) { type testCase struct { req *http.Request authT authType } nopCloser := io.NopCloser(io.LimitReader(&nullReader{}, 1024)) testCases := []testCase{ // Test case - 1 // Check for generic signature v4 header. { req: &http.Request{ URL: &url.URL{ Host: "127.0.0.1:9000",
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Fri May 24 23:05:23 UTC 2024 - 15.4K bytes - Viewed (0) -
internal/rest/client.go
buf := v.Bytes() req.GetBody = func() (io.ReadCloser, error) { r := bytes.NewReader(buf) return io.NopCloser(r), nil } case *bytes.Reader: req.ContentLength = int64(v.Len()) snapshot := *v req.GetBody = func() (io.ReadCloser, error) { r := snapshot return io.NopCloser(&r), nil } case *strings.Reader: req.ContentLength = int64(v.Len()) snapshot := *v
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Fri Jul 26 12:55:01 UTC 2024 - 14.7K bytes - Viewed (0) -
internal/s3select/select_test.go
r := bytes.NewReader(b) segmentReader := func(offset int64) (io.ReadCloser, error) { _, err := r.Seek(offset, io.SeekStart) if err != nil { return nil, err } return io.NopCloser(r), nil } return NewObjectReadSeekCloser(segmentReader, int64(len(b))) } type testResponseWriter struct { statusCode int response []byte } func (w *testResponseWriter) Header() http.Header {
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Sat Dec 23 07:19:11 UTC 2023 - 76.2K bytes - Viewed (0)