fix: config path error
This commit is contained in:
parent
d258cc51d3
commit
a305700a69
|
@ -29,7 +29,7 @@ type Config struct {
|
||||||
// Load 加载yaml/yml配置
|
// Load 加载yaml/yml配置
|
||||||
func (conifg *Config) Load() {
|
func (conifg *Config) Load() {
|
||||||
var configfile string
|
var configfile string
|
||||||
configlist := []string{"./config.yaml", "./config.yml", "../../config.yml", "../../config.yaml"}
|
configlist := []string{"./config.yaml", "./config.yml", "../../config.yml", "../../config.yaml", "../../../config.yml", "../../../config.yaml"}
|
||||||
for _, configfile = range configlist {
|
for _, configfile = range configlist {
|
||||||
if _, err := os.Stat(configfile); err == nil {
|
if _, err := os.Stat(configfile); err == nil {
|
||||||
log.Println("find config: ", configfile)
|
log.Println("find config: ", configfile)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user