|
|
|
@ -1,10 +1,9 @@
|
|
|
|
|
package config
|
|
|
|
|
|
|
|
|
|
import (
|
|
|
|
|
"context"
|
|
|
|
|
"fmt"
|
|
|
|
|
"github.com/mitchellh/mapstructure"
|
|
|
|
|
"github.com/openimsdk/tools/errs"
|
|
|
|
|
"github.com/openimsdk/tools/log"
|
|
|
|
|
"github.com/spf13/viper"
|
|
|
|
|
"strings"
|
|
|
|
|
)
|
|
|
|
@ -25,6 +24,6 @@ func LoadConfig(path string, envPrefix string, config any) error {
|
|
|
|
|
}); err != nil {
|
|
|
|
|
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)
|
|
|
|
|
fmt.Print("Load config success", "path", path, "envPrefix", envPrefix, "config", config)
|
|
|
|
|
return nil
|
|
|
|
|
}
|
|
|
|
|