mirror of
https://github.com/tinyauthapp/tinyauth.git
synced 2026-08-28 00:13:35 +08:00
feat: add golangci-lint for go linting
This commit is contained in:
@@ -68,10 +68,7 @@ func generateTotpCmd() *cli.Command {
|
||||
return fmt.Errorf("failed to parse user: %w", err)
|
||||
}
|
||||
|
||||
docker := false
|
||||
if strings.Contains(tCfg.User, "$$") {
|
||||
docker = true
|
||||
}
|
||||
docker := strings.Contains(tCfg.User, "$$")
|
||||
|
||||
if user.TOTPSecret != "" {
|
||||
return fmt.Errorf("user already has a TOTP secret")
|
||||
|
||||
@@ -9,8 +9,8 @@ import (
|
||||
"os"
|
||||
"time"
|
||||
|
||||
"github.com/tinyauthapp/tinyauth/internal/utils/tlog"
|
||||
"github.com/tinyauthapp/paerser/cli"
|
||||
"github.com/tinyauthapp/tinyauth/internal/utils/tlog"
|
||||
)
|
||||
|
||||
type healthzResponse struct {
|
||||
@@ -45,7 +45,7 @@ func healthcheckCmd() *cli.Command {
|
||||
}
|
||||
|
||||
if appUrl == "" {
|
||||
return errors.New("Could not determine app URL")
|
||||
return errors.New("could not determine app url")
|
||||
}
|
||||
|
||||
tlog.App.Info().Str("app_url", appUrl).Msg("Performing health check")
|
||||
@@ -70,7 +70,7 @@ func healthcheckCmd() *cli.Command {
|
||||
return fmt.Errorf("service is not healthy, got: %s", resp.Status)
|
||||
}
|
||||
|
||||
defer resp.Body.Close()
|
||||
defer resp.Body.Close() //nolint:errcheck
|
||||
|
||||
var healthResp healthzResponse
|
||||
|
||||
|
||||
Reference in New Issue
Block a user