Skip to content

Commit

Permalink
document use for bucket helper
Browse files Browse the repository at this point in the history
  • Loading branch information
noahdietz committed Aug 19, 2021
1 parent ec26534 commit f3b8217
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion storage/storage.go
Original file line number Diff line number Diff line change
Expand Up @@ -1687,7 +1687,9 @@ func (c *Client) ServiceAccount(ctx context.Context, projectID string) (string,
return res.EmailAddress, nil
}

// bucket formats the given project ID and bucket ID into a Bucket name.
// bucket formats the given project ID and bucket ID into a Bucket resource
// name. This is the format necessary for the gRPC API as it conforms to the
// Resource-oriented design practices in https://google.aip.dev/121.
func bucket(p, b string) string {
return fmt.Sprintf("projects/%s/buckets/%s", p, b)
}

0 comments on commit f3b8217

Please sign in to comment.