Skip to content

Commit 77cdb83

Browse files
authored
fix(storage): pass all user options to NewService (#12615)
1 parent c741391 commit 77cdb83

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

storage/storage.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,9 @@ func NewClient(ctx context.Context, opts ...option.ClientOption) (*Client, error
208208
return nil, fmt.Errorf("dialing: %w", err)
209209
}
210210
// RawService should be created with the chosen endpoint to take account of user override.
211-
rawService, err := raw.NewService(ctx, option.WithEndpoint(ep), option.WithHTTPClient(hc))
211+
// Preserve other user-supplied options as well.
212+
opts = append(opts, option.WithEndpoint(ep), option.WithHTTPClient(hc))
213+
rawService, err := raw.NewService(ctx, opts...)
212214
if err != nil {
213215
return nil, fmt.Errorf("storage client: %w", err)
214216
}

0 commit comments

Comments
 (0)