Skip to content

Commit

Permalink
Fix linter mnd
Browse files Browse the repository at this point in the history
  • Loading branch information
ofaurax committed Feb 3, 2025
1 parent 8a2fd7a commit 4bbb2a9
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion cmd/curl.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import (
var curlCmd = &cobra.Command{
Use: "curl fleetdbapi -- args",
Short: "Make a curl request with your auth token",
Args: cobra.MinimumNArgs(2), // nolint:gomnd
Args: cobra.MinimumNArgs(2), // nolint:gomnd,mnd
Run: func(cmd *cobra.Command, args []string) {
apiKind := args[0]
if !slices.Contains(
Expand Down
1 change: 1 addition & 0 deletions cmd/list/firmware.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ var listFirmware = &cobra.Command{
}

func init() {
// nolint:gomnd,mnd // Set non-0 limit by default, overridden by AddPageLimitFlag
flagsDefinedListFirmware = &listFirmwareFlags{limit: 10}

mctl.AddVendorFlag(listFirmware, &flagsDefinedListFirmware.vendor)
Expand Down
4 changes: 2 additions & 2 deletions internal/auth/oauth.go
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ func (a *authenticator) keyringStoreToken(token *oauth2.Token) error {
func (a *authenticator) authCodePKCE(ctx context.Context, oauthConfig *oauth2.Config, audience string) (*oauth2.Token, error) {
tc := make(chan *oauth2.Token)

// nolint:gomnd // state string is limited to 20 random characters
// nolint:gomnd,mnd // state string is limited to 20 random characters
c := &authClient{
oauthConfig: oauthConfig,
state: randStr(20),
Expand All @@ -207,7 +207,7 @@ func (a *authenticator) authCodePKCE(ctx context.Context, oauthConfig *oauth2.Co
c.handlePKCECallback(ctx, w, r, tc)
})

// nolint:gomnd // read header timeout is set to 30s
// nolint:gomnd,mnd // read header timeout is set to 30s
server := &http.Server{Addr: ":18000", ReadHeaderTimeout: time.Second * 30, Handler: mux}

go func() {
Expand Down

0 comments on commit 4bbb2a9

Please sign in to comment.