Skip to content

Commit

Permalink
fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
maduris committed Apr 23, 2024
1 parent aaafc6a commit eca3121
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,16 @@ func NewDatabase(ctx context.Context, databaseID *DatabaseID, credentialsFilePat
var client *spanner.Client
var err error

if credentialsFilePath != "" {
switch {
case credentialsFilePath != "":
credentialsFileClientOption := option.WithCredentialsFile(credentialsFilePath)
client, err = spanner.NewClient(ctx, databaseID.ID(), credentialsFileClientOption)
} else if useFGACDatabaseRole {
case useFGACDatabaseRole:
cfg := spanner.ClientConfig{
DatabaseRole: fgacRole,
}
client, err = spanner.NewClientWithConfig(ctx, databaseID.ID(), cfg)
} else {
default:
// Fallback to Application Default Credentials(https://google.aip.dev/auth/4110)
client, err = spanner.NewClient(ctx, databaseID.ID())
}
Expand Down

0 comments on commit eca3121

Please sign in to comment.