mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-12-02 18:34:29 +08:00
fix: fix the component check of path
This commit is contained in:
parent
d72a8b76b6
commit
e3846cabf6
@ -47,8 +47,8 @@ var (
|
||||
cfgPath = flag.String("c", defaultCfgPath, "Path to the configuration file")
|
||||
)
|
||||
|
||||
func initCfg(path string) (*config.GlobalConfig, error) {
|
||||
data, err := os.ReadFile(path)
|
||||
func initCfg() (*config.GlobalConfig, error) {
|
||||
data, err := os.ReadFile(*cfgPath)
|
||||
if err != nil {
|
||||
return nil, errs.Wrap(err, "ReadFile unmarshal failed")
|
||||
}
|
||||
@ -71,7 +71,7 @@ type checkFunc struct {
|
||||
func main() {
|
||||
flag.Parse()
|
||||
|
||||
conf, err := initCfg(defaultCfgPath)
|
||||
conf, err := initCfg()
|
||||
if err != nil {
|
||||
fmt.Printf("Read config failed: %v\n", err)
|
||||
return
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user