Skip to content

Commit b5bc2c3

Browse files
authored
Rename gcs.NewGCSArtifactService to gcs.NewArtifactsService (google#271)
Per Go style guideline, avoid repetitiveness caused by package name in identifier names.
1 parent 9992414 commit b5bc2c3

File tree

3 files changed

+2
-4
lines changed

3 files changed

+2
-4
lines changed
File renamed without changes.
File renamed without changes.

‎artifact/gcs/service.go‎ renamed to ‎artifact/gcsartifact/service.go‎

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,21 +46,19 @@ type gcsService struct {
4646
bucket gcsBucket
4747
}
4848

49-
// NewGCSArtifactService creates a gcsService for the specified bucket using a default client
50-
func NewGCSArtifactService(ctx context.Context, bucketName string, opts ...option.ClientOption) (artifact.Service, error) {
49+
// NewService creates a Google Cloud Storage service for the specified bucket.
50+
func NewService(ctx context.Context, bucketName string, opts ...option.ClientOption) (artifact.Service, error) {
5151
storageClient, err := storage.NewClient(ctx, opts...)
5252
if err != nil {
5353
return nil, fmt.Errorf("failed to create gcs service: %w", err)
5454
}
5555
// Wrap the real client
5656
clientWrapper := &gcsClientWrapper{client: storageClient}
57-
5857
s := &gcsService{
5958
bucketName: bucketName,
6059
storageClient: clientWrapper,
6160
bucket: clientWrapper.bucket(bucketName),
6261
}
63-
6462
return s, nil
6563
}
6664

0 commit comments

Comments
 (0)