|
@@ -1,33 +1,38 @@
|
|
|
package main
|
|
|
|
|
|
-import (
|
|
|
- "gin-vue-admin/core"
|
|
|
- "gin-vue-admin/global"
|
|
|
- "gin-vue-admin/initialize"
|
|
|
-)
|
|
|
+//import (
|
|
|
+// "gin-vue-admin/core"
|
|
|
+// "gin-vue-admin/global"
|
|
|
+// "gin-vue-admin/initialize"
|
|
|
+//)
|
|
|
+//
|
|
|
+////go:generate go env -w GO111MODULE=on
|
|
|
+////go:generate go env -w GOPROXY=https://goproxy.cn,direct
|
|
|
+////go:generate go mod tidy
|
|
|
+////go:generate go mod download
|
|
|
+//
|
|
|
+//// @title Swagger Example API
|
|
|
+//// @version 0.0.1
|
|
|
+//// @description This is a sample Server pets
|
|
|
+//// @securityDefinitions.apikey ApiKeyAuth
|
|
|
+//// @in header
|
|
|
+//// @name x-token
|
|
|
+//// @BasePath /
|
|
|
+//func main() {
|
|
|
+// global.GVA_VP = core.Viper() // 初始化Viper
|
|
|
+// global.GVA_LOG = core.Zap() // 初始化zap日志库
|
|
|
+// global.GVA_DB = initialize.Gorm() // gorm连接数据库
|
|
|
+// initialize.Timer()
|
|
|
+// if global.GVA_DB != nil {
|
|
|
+// initialize.MysqlTables(global.GVA_DB) // 初始化表
|
|
|
+// // 程序结束前关闭数据库链接
|
|
|
+// db, _ := global.GVA_DB.DB()
|
|
|
+// defer db.Close()
|
|
|
+// }
|
|
|
+// core.RunWindowsServer()
|
|
|
+//}
|
|
|
|
|
|
-//go:generate go env -w GO111MODULE=on
|
|
|
-//go:generate go env -w GOPROXY=https://goproxy.cn,direct
|
|
|
-//go:generate go mod tidy
|
|
|
-//go:generate go mod download
|
|
|
+var Plugin plugin
|
|
|
|
|
|
-// @title Swagger Example API
|
|
|
-// @version 0.0.1
|
|
|
-// @description This is a sample Server pets
|
|
|
-// @securityDefinitions.apikey ApiKeyAuth
|
|
|
-// @in header
|
|
|
-// @name x-token
|
|
|
-// @BasePath /
|
|
|
-func main() {
|
|
|
- global.GVA_VP = core.Viper() // 初始化Viper
|
|
|
- global.GVA_LOG = core.Zap() // 初始化zap日志库
|
|
|
- global.GVA_DB = initialize.Gorm() // gorm连接数据库
|
|
|
- initialize.Timer()
|
|
|
- if global.GVA_DB != nil {
|
|
|
- initialize.MysqlTables(global.GVA_DB) // 初始化表
|
|
|
- // 程序结束前关闭数据库链接
|
|
|
- db, _ := global.GVA_DB.DB()
|
|
|
- defer db.Close()
|
|
|
- }
|
|
|
- core.RunWindowsServer()
|
|
|
+type plugin struct {
|
|
|
}
|