()
| 54 | } |
| 55 | |
| 56 | func ExampleBucket_NewRangeReader() { |
| 57 | // PRAGMA: This example is used on gocloud.dev; PRAGMA comments adjust how it is shown and can be ignored. |
| 58 | // PRAGMA: On gocloud.dev, hide lines until the next blank line. |
| 59 | ctx := context.Background() |
| 60 | var bucket *blob.Bucket |
| 61 | |
| 62 | // Open the key "foo.txt" for reading at offset 1024 and read up to 4096 bytes. |
| 63 | r, err := bucket.NewRangeReader(ctx, "foo.txt", 1024, 4096, nil) |
| 64 | if err != nil { |
| 65 | log.Fatal(err) |
| 66 | } |
| 67 | defer r.Close() |
| 68 | // Copy from the read range to stdout. |
| 69 | if _, err := io.Copy(os.Stdout, r); err != nil { |
| 70 | log.Fatal(err) |
| 71 | } |
| 72 | } |
| 73 | |
| 74 | func ExampleBucket_NewWriter() { |
| 75 | // PRAGMA: This example is used on gocloud.dev; PRAGMA comments adjust how it is shown and can be ignored. |
nothing calls this directly
no test coverage detected