- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 13 for NopCloser (0.08 sec)
-
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) -
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) -
src/archive/zip/writer.go
w io.Writer count int64 } func (w *countWriter) Write(p []byte) (int, error) { n, err := w.w.Write(p) w.count += int64(n) return n, err } type nopCloser struct { io.Writer } func (w nopCloser) Close() error { return nil } type writeBuf []byte func (b *writeBuf) uint8(v uint8) { (*b)[0] = v *b = (*b)[1:] } func (b *writeBuf) uint16(v uint16) {
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Mon Sep 23 14:32:33 UTC 2024 - 19.4K bytes - Viewed (0) -
cmd/storage-rest-client.go
values.Set(storageRESTFilePath, path) values.Set(storageRESTLength, strconv.Itoa(int(size))) values.Set(storageRESTOrigVolume, origvolume) respBody, err := client.call(ctx, storageRESTMethodCreateFile, values, io.NopCloser(reader), size) defer xhttp.DrainBody(respBody) if err != nil { return err } _, err = waitForHTTPResponse(respBody) return toStorageErr(err) }
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Sun Oct 13 13:07:21 UTC 2024 - 30.2K bytes - Viewed (0) -
cmd/auth-handler.go
return ErrMalformedXML } // Populate payload to extract location constraint. r.Body = io.NopCloser(bytes.NewReader(payload)) region, s3Err = parseLocationConstraint(r) if s3Err != ErrNone { return s3Err } // Populate payload again to handle it in HTTP handler. r.Body = io.NopCloser(bytes.NewReader(payload)) } logger.GetReqInfo(ctx).Region = region return s3Err }
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Tue Sep 17 16:45:46 UTC 2024 - 26.1K bytes - Viewed (0) -
cmd/s3-zip-handlers.go
return } defer gr.Close() rc, err = file.Open(gr) if err != nil { writeErrorResponse(ctx, w, toAPIError(ctx, err), r.URL) return } } else { rc = io.NopCloser(bytes.NewReader([]byte{})) } defer rc.Close() if err = setObjectHeaders(ctx, w, fileObjInfo, nil, opts); err != nil { writeErrorResponse(ctx, w, toAPIError(ctx, err), r.URL) return }
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Mon Jun 10 15:31:51 UTC 2024 - 15.8K bytes - Viewed (0) -
istioctl/pkg/validate/validate.go
var errs error var reader io.ReadCloser warningsByFilename := map[string]validation.Warning{} processFile := func(path string) { var err error if path == "-" { reader = io.NopCloser(os.Stdin) } else { reader, err = os.Open(path) if err != nil { errs = multierror.Append(errs, fmt.Errorf("cannot read file %q: %v", path, err)) return } }
Registered: Wed Nov 06 22:53:10 UTC 2024 - Last Modified: Thu Aug 15 22:27:47 UTC 2024 - 14.3K bytes - Viewed (0) -
api/go1.19.txt
pkg crypto/x509/pkix, type TBSCertificateList //deprecated #50674 pkg go/doc, func Synopsis //deprecated #51082 pkg go/doc, func ToHTML //deprecated #51082 pkg go/doc, func ToText //deprecated #51082 pkg io/ioutil, func NopCloser //deprecated #42026 pkg io/ioutil, func ReadAll //deprecated #42026 pkg io/ioutil, func ReadDir //deprecated #42026 pkg io/ioutil, func ReadFile //deprecated #42026 pkg io/ioutil, func TempDir //deprecated #42026
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Fri Dec 02 16:29:41 UTC 2022 - 17.9K bytes - Viewed (0)