- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 14 for NewBuffer (0.09 sec)
-
src/bytes/buffer_test.go
} s += string(fub) check(t, testname+" (fill 4)", buf, s) } return s } func TestNewBuffer(t *testing.T) { buf := NewBuffer(testBytes) check(t, "NewBuffer", buf, testString) } var buf Buffer // Calling NewBuffer and immediately shallow copying the Buffer struct // should not result in any allocations. // This can be used to reset the underlying []byte of an existing Buffer.
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Tue Sep 03 20:55:15 UTC 2024 - 18.6K bytes - Viewed (0) -
cmd/bucket-metadata.go
if err != nil { return } outbuf := bytes.NewBuffer(nil) objectKey := crypto.GenerateKey(key.Plaintext, rand.Reader) sealedKey := objectKey.Seal(key.Plaintext, crypto.GenerateIV(rand.Reader), crypto.S3.String(), bucket, "") crypto.S3.CreateMetadata(metadata, key.KeyID, key.Ciphertext, sealedKey)
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Wed Aug 28 15:32:18 UTC 2024 - 18.2K bytes - Viewed (0) -
internal/s3select/sql/jsonpath_test.go
"reflect" "testing" "github.com/alecthomas/participle" "github.com/minio/minio/internal/s3select/jstream" ) func getJSONStructs(b []byte) ([]interface{}, error) { dec := jstream.NewDecoder(bytes.NewBuffer(b), 0).ObjectAsKVS().MaxDepth(100) var result []interface{} for parsedVal := range dec.Stream() { result = append(result, parsedVal.Value) } if err := dec.Err(); err != nil { return nil, err }
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Mon Sep 23 19:35:41 UTC 2024 - 2.8K bytes - Viewed (0) -
src/bytes/buffer.go
slice, err := b.readSlice(delim) return string(slice), err } // NewBuffer creates and initializes a new [Buffer] using buf as its // initial contents. The new [Buffer] takes ownership of buf, and the // caller should not use buf after this call. NewBuffer is intended to // prepare a [Buffer] to read existing data. It can also be used to set
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Tue Oct 29 16:47:05 UTC 2024 - 15.7K bytes - Viewed (0) -
cmd/admin-handlers-users_test.go
_, err := client.PutObject(ctx, bucket, "some-object", bytes.NewBuffer([]byte("stuff")), 5, minio.PutObjectOptions{}) if err != nil { c.Fatalf("upload did not succeed got %#v", err) } } func (c *check) mustNotUpload(ctx context.Context, client *minio.Client, bucket string) { c.Helper() _, err := client.PutObject(ctx, bucket, "some-object", bytes.NewBuffer([]byte("stuff")), 5, minio.PutObjectOptions{})
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Sun Sep 22 00:33:43 UTC 2024 - 47.3K bytes - Viewed (0) -
internal/s3select/json/preader.go
in.dst <- nil continue } dst, ok := r.kvDstPool.Get().([]jstream.KVS) if !ok { dst = make([]jstream.KVS, 0, 1000) } d := jstream.NewDecoder(bytes.NewBuffer(in.input), 0).ObjectAsKVS().MaxDepth(100) stream := d.Stream() all := dst[:0] for mv := range stream { var kvs jstream.KVS if mv.ValueType == jstream.Object {
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Mon Sep 23 19:35:41 UTC 2024 - 6.5K bytes - Viewed (0) -
src/bufio/bufio_test.go
srcBuf := bytes.NewBuffer(make([]byte, 8192)) src := NewReader(onlyReader{srcBuf}) dstBuf := new(bytes.Buffer) dst := onlyWriter{dstBuf} for i := 0; i < b.N; i++ { srcBuf.Reset() src.Reset(onlyReader{srcBuf}) dstBuf.Reset() io.Copy(dst, src) } } func BenchmarkReaderCopyNoWriteTo(b *testing.B) { srcBuf := bytes.NewBuffer(make([]byte, 8192))
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Fri Nov 01 21:52:12 UTC 2024 - 51.6K bytes - Viewed (0) -
cmd/test-utils_test.go
if err != nil { t.Fatal(failTestStr(anonTestStr, err.Error())) } // creating 2 read closer (to set as request body) from the body content. readerOne := io.NopCloser(bytes.NewBuffer(buf)) readerTwo := io.NopCloser(bytes.NewBuffer(buf)) anonReq.Body = readerOne // call the HTTP handler. apiRouter.ServeHTTP(rec, anonReq) // expected error response when the unsigned HTTP request is not permitted.
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Tue Oct 01 22:13:18 UTC 2024 - 77K bytes - Viewed (0) -
internal/s3select/select.go
parquetSupport = env.Get("MINIO_API_SELECT_PARQUET", config.EnableOff) == config.EnableOn } var bufPool = sync.Pool{ New: func() interface{} { // make a buffer with a reasonable capacity. return bytes.NewBuffer(make([]byte, 0, maxRecordSize)) }, } var bufioWriterPool = sync.Pool{ New: func() interface{} { // io.Discard is just used to create the writer. Actual destination
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Sun Sep 22 00:33:43 UTC 2024 - 21.2K bytes - Viewed (0) -
docs/debugging/xl-meta/main.go
if err != nil { return nil, err } b, _, minor, err := checkXL2V1(b) if err != nil { return nil, err } filemap[file] = make(map[string]string) buf := bytes.NewBuffer(nil) v0 := "" var data xlMetaInlineData switch minor { case 0: _, err = msgp.CopyToJSON(buf, bytes.NewReader(b)) if err != nil { return nil, err } case 1, 2:
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Thu Sep 05 11:57:44 UTC 2024 - 40.3K bytes - Viewed (0)