Skip to content

Commit

Permalink
Fix lint comments
Browse files Browse the repository at this point in the history
  • Loading branch information
deadlycoconuts committed Mar 27, 2023
1 parent 85e9db0 commit ed62d53
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion api/pkg/auth/google_auth.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ func InitGoogleClient(ctx context.Context, audience string) (*http.Client, error
return nil, err
}

if len(cred.JSON) < 0 {
if len(cred.JSON) == 0 {
return nil, fmt.Errorf("no default credentials found")
}

Expand All @@ -68,6 +68,9 @@ func InitGoogleClient(ctx context.Context, audience string) (*http.Client, error
return idtoken.NewClient(ctx, audience)
} else {
defaultTokenSource, err := google.DefaultTokenSource(ctx)
if err != nil {
return nil, err
}
tokenSource := oauth2.ReuseTokenSource(nil, &idTokenSource{TokenSource: defaultTokenSource})

var opts []idtoken.ClientOption
Expand Down

0 comments on commit ed62d53

Please sign in to comment.