package tests import ( "fmt" "surveyService/cache" "surveyService/model" "github.com/joho/godotenv" ) func Init() { // 加载dotEnv环境 loadEnvErr := godotenv.Load("/Users/huang/Desktop/hys/surveyService/.env") if loadEnvErr != nil { fmt.Println("ENV环境加载Error") return } // 开始初始化数据库 model.Construct(false) // 开始初始化缓存 cache.InitRedis() }