Skip to content

Small tweak to bucket names in Cloud Storage API code snippet (readme.md) #709

Description

@macvean

In the following code, there is potential for slight confusion, due to the similarity in bucket names:

// Create a new bucket.
gcs.createBucket('my-new-bucket', function(err, bucket) {});

// Reference an existing bucket.
var bucket = gcs.bucket('my-bucket');

I would suggest updating the snippet to something like:

gcs.createBucket('my-new-bucket', function(err, bucket) {
//do something with your bucket, or deal with the error
});

// Reference an existing bucket.
var bucket = gcs.bucket('an-existing-bucket');

Activity

  1. stephenplusplus commented on Jul 8, 2015

    @stephenplusplus
    Contributor

    👍

  2. added a commit that references this issue on Feb 3, 2026
  3. added a commit that references this issue on Feb 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions