Skip to content

Commit

Permalink
chore: address minor feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
kurtisvg committed Mar 31, 2021
1 parent d33e559 commit b986338
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions dialer.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,9 @@ func NewDialer(ctx context.Context, opts ...DialerOption) (*Dialer, error) {
return nil, fmt.Errorf("failed to generate rsa keys: %v", err)
}

var cfg dialerConfig
cfg := &dialerConfig{}
for _, opt := range opts {
opt(&cfg)
opt(cfg)
}

client, err := sqladmin.NewService(context.Background(), cfg.sqladminOpts...)
Expand Down
4 changes: 2 additions & 2 deletions options.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import (
// A DialerOption is an option for configuring a Dialer.
type DialerOption func(d *dialerConfig)

// DialerOptions turns a list of DialerOption instances into an DialerOption.
// DialerOptions turns a list of DialerOption instances into a DialerOption.
func DialerOptions(opts ...DialerOption) DialerOption {
return func(d *dialerConfig) {
for _, opt := range opts {
Expand All @@ -38,7 +38,7 @@ func WithCredentialsFile(filename string) DialerOption {
}
}

// WithCredentialsFile returns a DialerOption that specifies a service account or refresh token JSON credentials to be used as the basis for authentication.
// WithCredentialsJSON returns a DialerOption that specifies a service account or refresh token JSON credentials to be used as the basis for authentication.
func WithCredentialsJSON(p []byte) DialerOption {
return func(d *dialerConfig) {
d.sqladminOpts = append(d.sqladminOpts, apiopt.WithCredentialsJSON(p))
Expand Down

0 comments on commit b986338

Please sign in to comment.