diff --git a/config/config.go b/config/config.go index 3d7b7ae..bb95129 100644 --- a/config/config.go +++ b/config/config.go @@ -103,3 +103,12 @@ func NewConfig(logger *zap.Logger) *Config { return c } + +func SaveConfig(cfg *Config) error { + err := viper.Unmarshal(cfg) + if err != nil { + return err + } + + return viper.WriteConfig() +}