adjust phoenix

This commit is contained in:
A.Unger
2020-11-04 15:33:14 +01:00
parent 8bef86ca31
commit 1c6ff61c53
2 changed files with 11 additions and 15 deletions
+4 -8
View File
@@ -31,10 +31,6 @@ func Execute() error {
Flags: flagset.RootWithConfig(cfg),
Before: func(c *cli.Context) error {
return ParseConfig(c, cfg)
},
Commands: []*cli.Command{
Server(cfg),
Health(cfg),
@@ -86,22 +82,22 @@ func ParseConfig(c *cli.Context, cfg *config.Config) error {
switch err.(type) {
case viper.ConfigFileNotFoundError:
logger.Info().
Msg("Continue without config")
Msg("no config found on preconfigured location")
case viper.UnsupportedConfigError:
logger.Fatal().
Err(err).
Msg("Unsupported config type")
Msg("unsupported config type")
default:
logger.Fatal().
Err(err).
Msg("Failed to read config")
Msg("failed to read config")
}
}
if err := viper.Unmarshal(&cfg); err != nil {
logger.Fatal().
Err(err).
Msg("Failed to parse config")
Msg("failed to parse config")
}
return nil