fix: Startup error

Fixed a path error that prompted that the configuration file could not be found at startup
This commit is contained in:
antcorp 2021-10-14 08:33:21 +08:00 committed by GitHub
parent 7d7818bc38
commit c1504d06bd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -3,6 +3,7 @@ package config
import (
"gopkg.in/yaml.v3"
"io/ioutil"
"os"
)
var Config config
@ -147,6 +148,7 @@ type config struct {
}
func init() {
path, _ := os.Getwd()
bytes, err := ioutil.ReadFile("../config/config.yaml")
if err != nil {
panic(err)