fix: further coderabbit suggestions

This commit is contained in:
Stavros
2025-08-26 14:49:55 +03:00
parent a5e1ae096b
commit a1b6ecdd5d
9 changed files with 33 additions and 18 deletions

View File

@@ -8,7 +8,7 @@ import (
"tinyauth/internal/config"
"tinyauth/internal/utils"
"github.com/go-playground/validator"
"github.com/go-playground/validator/v10"
"github.com/rs/zerolog"
"github.com/rs/zerolog/log"
"github.com/spf13/cobra"
@@ -34,9 +34,9 @@ var rootCmd = &cobra.Command{
conf.GenericClientSecret = utils.GetSecret(conf.GenericClientSecret, conf.GenericClientSecretFile)
// Validate config
validator := validator.New()
v := validator.New()
err = validator.Struct(conf)
err = v.Struct(conf)
if err != nil {
log.Fatal().Err(err).Msg("Invalid config")
}