From ebf2951ea35e0b1d643de71b7e57680ff9d674bf Mon Sep 17 00:00:00 2001 From: Evan Chen Date: Fri, 17 Dec 2021 00:09:51 +0800 Subject: [PATCH] feat: export setup --- system/setup.go | 6 +++--- system/system.go | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) 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() {