WIP: Refactor entire project #16

Draft
tom wants to merge 23 commits from make_linters_happy into main
2 changed files with 4 additions and 0 deletions
Showing only changes of commit 535ed5a5c6 - Show all commits

View file

@ -32,6 +32,8 @@ func NewRootCommand(c *config.Config) *cobra.Command {
zerolog.SetGlobalLevel(zerolog.InfoLevel)
if c.Debug {
zerolog.SetGlobalLevel(zerolog.DebugLevel)
} else if c.Quiet {
zerolog.SetGlobalLevel(zerolog.ErrorLevel)
}
if c.JSONFormat {
@ -47,6 +49,7 @@ func NewRootCommand(c *config.Config) *cobra.Command {
rootCmd.PersistentFlags().BoolVarP(&c.Debug, "debug", "d", false, "Debug output")
rootCmd.PersistentFlags().BoolVar(&c.JSONFormat, "json", false, "JSON output")
rootCmd.PersistentFlags().BoolVar(&c.Quiet, "quiet", false, "Quiet output (only errors)")
rootCmd.PersistentFlags().StringVar(&c.GrafanaURL, "grafana-url", "", "Grafana URL to access the API")
rootCmd.PersistentFlags().StringVar(&c.GrafanaToken, "grafana-token", "", "Grafana auth token to access the API")
rootCmd.PersistentFlags().StringVar(&c.GitBranch, "git-branch", "main", "Git branch name")

View file

@ -19,6 +19,7 @@ type Config struct {
GitUser string
GitPass string
GPGKey string
Quiet bool
Output io.Writer
Logger zerolog.Logger