mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-10-26 05:02:11 +08:00
fix: Startup error
Fixed a path error that prompted that the configuration file could not be found at startup
This commit is contained in:
parent
7d7818bc38
commit
c1504d06bd
@ -3,6 +3,7 @@ package config
|
|||||||
import (
|
import (
|
||||||
"gopkg.in/yaml.v3"
|
"gopkg.in/yaml.v3"
|
||||||
"io/ioutil"
|
"io/ioutil"
|
||||||
|
"os"
|
||||||
)
|
)
|
||||||
|
|
||||||
var Config config
|
var Config config
|
||||||
@ -147,6 +148,7 @@ type config struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
|
path, _ := os.Getwd()
|
||||||
bytes, err := ioutil.ReadFile("../config/config.yaml")
|
bytes, err := ioutil.ReadFile("../config/config.yaml")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
panic(err)
|
panic(err)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user