Skip to content

Commit ac108b7

Browse files
authored
Update zt_examples_test.go
Len() returns the number of bytes of the unread portion of the string, Size() returns the length of the underlying string.
1 parent 457680c commit ac108b7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

azblob/zt_examples_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -941,7 +941,7 @@ func Example_progressUploadDownload() {
941941
// Wrap the request body in a RequestBodyProgress and pass a callback function for progress reporting.
942942
_, err = blobURL.Upload(ctx,
943943
pipeline.NewRequestBodyProgress(requestBody, func(bytesTransferred int64) {
944-
fmt.Printf("Wrote %d of %d bytes.", bytesTransferred, requestBody.Len())
944+
fmt.Printf("Wrote %d of %d bytes.", bytesTransferred, requestBody.Size())
945945
}),
946946
azblob.BlobHTTPHeaders{
947947
ContentType: "text/html; charset=utf-8",

0 commit comments

Comments
 (0)