Skip to content

Commit

Permalink
linter updates
Browse files Browse the repository at this point in the history
  • Loading branch information
JordanSussman committed Aug 26, 2024
1 parent 9f8b175 commit 39a2f63
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
4 changes: 4 additions & 0 deletions internal/token/mint.go
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,7 @@ func (tm *Manager) MintToken(mto *MintTokenOpts) (string, error) {
func (tm *Manager) MintIDToken(ctx context.Context, mto *MintTokenOpts, db database.Interface) (string, error) {
// initialize claims struct
var claims = new(api.OpenIDClaims)

var err error

// validate provided claims
Expand Down Expand Up @@ -168,6 +169,9 @@ func (tm *Manager) MintIDToken(ctx context.Context, mto *MintTokenOpts, db datab
claims.TokenType = mto.TokenType
claims.Image = mto.Image
claims.ImageName, claims.ImageTag, err = imageParse(mto.Image)
if err != nil {

Check failure on line 172 in internal/token/mint.go

View workflow job for this annotation

GitHub Actions / golangci

[golangci] internal/token/mint.go#L172

only one cuddle assignment allowed before if statement (wsl)
Raw output
internal/token/mint.go:172:2: only one cuddle assignment allowed before if statement (wsl)
	if err != nil {
	^
return "", err
}
claims.Request = mto.Request

Check failure on line 175 in internal/token/mint.go

View workflow job for this annotation

GitHub Actions / golangci

[golangci] internal/token/mint.go#L175

assignments should only be cuddled with other assignments (wsl)
Raw output
internal/token/mint.go:175:2: assignments should only be cuddled with other assignments (wsl)
	claims.Request = mto.Request
	^
claims.Commands = mto.Commands

Expand Down
2 changes: 2 additions & 0 deletions internal/token/mint_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// SPDX-License-Identifier: Apache-2.0

package token

import "testing"
Expand Down

0 comments on commit 39a2f63

Please sign in to comment.