Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 5 of 5 for NewBufferString (0.17 sec)

  1. 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 May 05 19:28:20 GMT 2024
    - Last Modified: Thu Feb 22 06:26:06 GMT 2024
    - 32.3K bytes
    - Viewed (0)
  2. src/bytes/buffer_test.go

    	})
    	if n > 0 {
    		t.Errorf("allocations occurred while shallow copying")
    	}
    	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 30 11:13:12 GMT 2024
    - Last Modified: Fri Apr 26 13:31:36 GMT 2024
    - 18.6K bytes
    - Viewed (0)
  3. 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 May 05 19:28:20 GMT 2024
    - Last Modified: Wed May 01 11:07:40 GMT 2024
    - 73.1K bytes
    - Viewed (0)
  4. 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 May 05 19:28:20 GMT 2024
    - Last Modified: Thu Feb 22 06:26:06 GMT 2024
    - 77.1K bytes
    - Viewed (0)
  5. 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 30 11:13:12 GMT 2024
    - Last Modified: Mon Mar 04 15:54:40 GMT 2024
    - 15K bytes
    - Viewed (1)
Back to top