diff --git a/system/setup.go b/system/setup.go index 0aabf29..8817063 100644 --- a/system/setup.go +++ b/system/setup.go @@ -43,10 +43,10 @@ func init() { viper.SetEnvKeyReplacer(replacer) viper.AutomaticEnv() viper.SetConfigType("json") - setup() + Setup() } -func setup() { +func Setup() { zerolog.TimeFieldFormat = zerolog.TimeFormatUnix zerolog.DurationFieldInteger = true zerolog.SetGlobalLevel(zerolog.Level(viper.GetInt("log.level"))) @@ -114,7 +114,7 @@ func ConfigRead(cfgFile string) { if err := viper.ReadInConfig(); err != nil { l.Error().Err(err).Msg("ReadInConfig error") } - setup() + Setup() } // ConfigWrite write current config to file diff --git a/system/system.go b/system/system.go index c6302a9..78c0c36 100644 --- a/system/system.go +++ b/system/system.go @@ -98,7 +98,7 @@ func New() *System { } func (sys *System) Start() { - // setup() + // Setup() sys.order() sys.status = sys_init go func() {