feat: add SaveConfig

This commit is contained in:
Derrick Hammer 2024-02-11 14:50:53 -05:00
parent 0365862777
commit 5036d0bca4
Signed by: pcfreak30
GPG Key ID: C997C339BE476FF2
1 changed files with 9 additions and 0 deletions

View File

@ -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()
}