- Sort Score
- Result 10 results
- Languages All
Results 1 - 9 of 9 for NewBufferString (0.22 sec)
-
cmd/object_api_suite_test.go
{ _, err = obj.PutObject(context.Background(), "bucket", "newPrefix", mustGetPutObjReader(t, bytes.NewBufferString(uploadContent), int64(len(uploadContent)), "", ""), opts) if err != nil { t.Fatalf("%s: <ERROR> %s", instanceType, err) } _, err = obj.PutObject(context.Background(), "bucket", "newPrefix2", mustGetPutObjReader(t, bytes.NewBufferString(uploadContent), int64(len(uploadContent)), "", ""), opts) if err != nil {
Go - Registered: Sun Apr 21 19:28:08 GMT 2024 - Last Modified: Thu Feb 22 06:26:06 GMT 2024 - 32.3K bytes - Viewed (0) -
istioctl/pkg/util/proto/messageslice.go
type MessageSlice []proto.Message // MarshalJSON handles marshaling of slices of proto messages func (pSlice MessageSlice) MarshalJSON() ([]byte, error) { buffer := bytes.NewBufferString("[") sliceLength := len(pSlice) for index, msg := range pSlice { b, err := protomarshal.Marshal(msg) if err != nil { return nil, err } buffer.Write(b) if index < sliceLength-1 {
Go - Registered: Wed Apr 24 22:53:08 GMT 2024 - Last Modified: Tue Oct 19 21:53:59 GMT 2021 - 1.3K bytes - Viewed (0) -
cmd/object-api-getobjectinfo_test.go
if err != nil { t.Fatalf("%s : %s", instanceType, err.Error()) } // Put an empty directory _, err = obj.PutObject(context.Background(), "test-getobjectinfo", "Asia/empty-dir/", mustGetPutObjReader(t, bytes.NewBufferString(""), int64(len("")), "", ""), opts) if err != nil {
Go - Registered: Sun Apr 21 19:28:08 GMT 2024 - Last Modified: Fri Dec 23 15:46:00 GMT 2022 - 5.6K bytes - Viewed (0) -
src/bytes/buffer_test.go
} return s } func TestNewBuffer(t *testing.T) { buf := NewBuffer(testBytes) check(t, "NewBuffer", buf, testString) } func TestNewBufferString(t *testing.T) { buf := NewBufferString(testString) check(t, "NewBufferString", buf, testString) } // Empty buf through repeated reads into fub. // The initial contents of buf corresponds to the string s.
Go - Registered: Tue Apr 23 11:13:09 GMT 2024 - Last Modified: Thu Apr 20 01:07:29 GMT 2023 - 18.1K bytes - Viewed (0) -
src/bytes/buffer.go
func NewBuffer(buf []byte) *Buffer { return &Buffer{buf: buf} } // NewBufferString creates and initializes a new [Buffer] using string s as its // initial contents. It is intended to prepare a buffer to read an existing // string. // // In most cases, new([Buffer]) (or just declaring a [Buffer] variable) is // sufficient to initialize a [Buffer]. func NewBufferString(s string) *Buffer { return &Buffer{buf: []byte(s)}
Go - Registered: Tue Apr 23 11:13:09 GMT 2024 - Last Modified: Fri Oct 13 17:10:31 GMT 2023 - 15.7K bytes - Viewed (0) -
cmd/object-api-listobjects_test.go
} for _, object := range testObjects { md5Bytes := md5.Sum([]byte(object.content)) _, err = obj.PutObject(context.Background(), object.parentBucket, object.name, mustGetPutObjReader(t, bytes.NewBufferString(object.content), int64(len(object.content)), hex.EncodeToString(md5Bytes[:]), ""), ObjectOptions{ Versioned: globalBucketVersioningSys.PrefixEnabled(object.parentBucket, object.name), UserDefined: object.meta, })
Go - Registered: Sun Apr 21 19:28:08 GMT 2024 - Last Modified: Tue Jan 30 20:43:25 GMT 2024 - 73.1K bytes - Viewed (0) -
cmd/object-api-multipart_test.go
for i, testCase := range testCases { actualInfo, actualErr := obj.PutObjectPart(context.Background(), testCase.bucketName, testCase.objName, testCase.uploadID, testCase.PartID, mustGetPutObjReader(t, bytes.NewBufferString(testCase.inputReaderData), testCase.inputDataSize, testCase.inputMd5, testCase.inputSHA256), opts) // All are test cases above are expected to fail. if actualErr != nil && testCase.shouldPass {
Go - Registered: Sun Apr 21 19:28:08 GMT 2024 - Last Modified: Thu Feb 22 06:26:06 GMT 2024 - 77.1K bytes - Viewed (0) -
src/bytes/example_test.go
b.Write([]byte("Hello ")) fmt.Fprintf(&b, "world!") b.WriteTo(os.Stdout) // Output: Hello world! } func ExampleBuffer_reader() { // A Buffer can turn a string or a []byte into an io.Reader. buf := bytes.NewBufferString("R29waGVycyBydWxlIQ==") dec := base64.NewDecoder(base64.StdEncoding, buf) io.Copy(os.Stdout, dec) // Output: Gophers rule! } func ExampleBuffer_Bytes() { buf := bytes.Buffer{}
Go - Registered: Tue Apr 23 11:13:09 GMT 2024 - Last Modified: Mon Mar 04 15:54:40 GMT 2024 - 15K bytes - Viewed (1) -
api/go1.txt
pkg bytes, func LastIndexFunc([]uint8, func(int32) bool) int pkg bytes, func Map(func(int32) int32, []uint8) []uint8 pkg bytes, func NewBuffer([]uint8) *Buffer pkg bytes, func NewBufferString(string) *Buffer pkg bytes, func NewReader([]uint8) *Reader pkg bytes, func Repeat([]uint8, int) []uint8 pkg bytes, func Replace([]uint8, []uint8, []uint8, int) []uint8 pkg bytes, func Runes([]uint8) []int32
Plain Text - Registered: Tue Apr 23 11:13:09 GMT 2024 - Last Modified: Wed Aug 14 18:58:28 GMT 2013 - 1.7M bytes - Viewed (1)