Skip to content

Commit

Permalink
use direct assignment to index instead of append
Browse files Browse the repository at this point in the history
Co-authored-by: Calvin Leung Huang <[email protected]>
  • Loading branch information
austingebauer and calvn authored Feb 2, 2021
1 parent a15e6f7 commit 677f4ed
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions path_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -320,9 +320,9 @@ func (b *jwtAuthBackend) pathConfigWrite(ctx context.Context, req *logical.Reque
}

func (b *jwtAuthBackend) createProvider(config *jwtConfig) (*oidc.Provider, error) {
supportedSigAlgs := make([]oidc.Alg, 0)
for _, a := range config.JWTSupportedAlgs {
supportedSigAlgs = append(supportedSigAlgs, oidc.Alg(a))
supportedSigAlgs := make([]oidc.Alg, len(config.JWTSupportedAlgs))
for i, a := range config.JWTSupportedAlgs {
supportedSigAlgs[i] = oidc.Alg(a)
}

if len(supportedSigAlgs) == 0 {
Expand Down

0 comments on commit 677f4ed

Please sign in to comment.