refactor: cmd update.

This commit is contained in:
Gordon 2024-04-15 10:29:24 +08:00
parent 9edc48d088
commit 285b1e8243

View File

@ -1,8 +1,10 @@
package config package config
import ( import (
"context"
"github.com/mitchellh/mapstructure" "github.com/mitchellh/mapstructure"
"github.com/openimsdk/tools/errs" "github.com/openimsdk/tools/errs"
"github.com/openimsdk/tools/log"
"github.com/spf13/viper" "github.com/spf13/viper"
"strings" "strings"
) )
@ -23,6 +25,6 @@ func LoadConfig(path string, envPrefix string, config any) error {
}); err != nil { }); err != nil {
return errs.WrapMsg(err, "failed to unmarshal config", "path", path, "envPrefix", envPrefix) return errs.WrapMsg(err, "failed to unmarshal config", "path", path, "envPrefix", envPrefix)
} }
log.CInfo(context.Background(), "Load config success", "path", path, "envPrefix", envPrefix, "config", config)
return nil return nil
} }