From c1504d06bd41c70cfaffa89fe38b0f721ffa3bc0 Mon Sep 17 00:00:00 2001 From: antcorp <527455294@qq.com> Date: Thu, 14 Oct 2021 08:33:21 +0800 Subject: [PATCH] fix: Startup error Fixed a path error that prompted that the configuration file could not be found at startup --- src/common/config/config.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/common/config/config.go b/src/common/config/config.go index faf75a5b8..951663a2d 100644 --- a/src/common/config/config.go +++ b/src/common/config/config.go @@ -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)