Bumps [cloud.google.com/go/compute](https://github.com/googleapis/google-cloud-go) from 1.10.0 to 1.19.3. - [Release notes](https://github.com/googleapis/google-cloud-go/releases) - [Changelog](https://github.com/googleapis/google-cloud-go/blob/main/documentai/CHANGES.md) - [Commits](https://github.com/googleapis/google-cloud-go/compare/kms/v1.10.0...compute/v1.19.3) --- updated-dependencies: - dependency-name: cloud.google.com/go/compute dependency-type: direct:production update-type: version-update:semver-minor ... Migrated to the new version by following https://github.com/googleapis/google-cloud-go/blob/main/migration.md Co-authored-by: Tomáš Hozza <thozza@redhat.com> Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: Tomáš Hozza <thozza@redhat.com>
909 B
909 B
Cloud Storage 
Example Usage
First create a storage.Client to use throughout your application:
client, err := storage.NewClient(ctx)
if err != nil {
log.Fatal(err)
}
// Read the object1 from bucket.
rc, err := client.Bucket("bucket").Object("object1").NewReader(ctx)
if err != nil {
log.Fatal(err)
}
defer rc.Close()
body, err := io.ReadAll(rc)
if err != nil {
log.Fatal(err)
}