update: The code structure is finished, and the project can run successfully

This commit is contained in:
QM303176530
2020-04-05 16:18:19 +08:00
parent 1891c1bcbc
commit 08ff55ffce
13 changed files with 60 additions and 50 deletions

View File

@@ -10,7 +10,7 @@ import (
func init() {
v := viper.New()
v.SetConfigName("config") // 设置配置文件名 (不带后缀)
v.AddConfigPath("/") // 第一个搜索路径
v.AddConfigPath("./") // 第一个搜索路径
v.SetConfigType("json")
err := v.ReadInConfig() // 搜索路径,并读取配置数据
if err != nil {