config file update

This commit is contained in:
Gordon 2022-08-01 16:42:07 +08:00
parent 6734c714d7
commit c17ca47e7d

View File

@ -512,11 +512,10 @@ type PDefaultTips struct {
func init() {
cfgName := os.Getenv("CONFIG_NAME")
fmt.Println("GET IM DEFAULT CONFIG PATH :", Root, "ENV PATH:", cfgName, b, filepath.Dir(b))
if len(cfgName) != 0 {
Root = cfgName
}
fmt.Println("GET IM DEFAULT CONFIG PATH :", Root, "ENV PATH:", cfgName)
bytes, err := ioutil.ReadFile(filepath.Join(Root, "config", "config.yaml"))
if err != nil {
panic(err.Error())