2021-03-23 00:55:26 +08:00
|
|
|
/*
|
|
|
|
* @Date: 2021-03-21 19:54:57
|
|
|
|
* @LastEditors: viletyy
|
2021-06-14 21:15:55 +08:00
|
|
|
* @LastEditTime: 2021-06-13 23:32:06
|
2021-03-23 00:55:26 +08:00
|
|
|
* @FilePath: /potato/main.go
|
|
|
|
*/
|
2019-08-07 20:56:20 +08:00
|
|
|
package main
|
|
|
|
|
|
|
|
import (
|
2021-03-23 00:55:26 +08:00
|
|
|
"github.com/viletyy/potato/global"
|
|
|
|
"github.com/viletyy/potato/initialize"
|
2019-08-07 20:56:20 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
// @title Potato Api
|
|
|
|
// @version 1.0
|
2021-06-10 15:37:36 +08:00
|
|
|
// @description This is a potato use golang
|
2019-08-07 20:56:20 +08:00
|
|
|
// @BasePath /api
|
|
|
|
|
|
|
|
func main() {
|
2021-03-23 00:55:26 +08:00
|
|
|
global.GO_VP = initialize.Viper()
|
|
|
|
global.GO_LOG = initialize.Zap()
|
|
|
|
global.GO_DB = initialize.Gorm()
|
|
|
|
global.GO_REDIS = initialize.Redis()
|
2021-06-14 21:15:55 +08:00
|
|
|
global.GO_TRACER = initialize.Tracer()
|
2019-08-07 20:56:20 +08:00
|
|
|
|
2021-03-23 00:55:26 +08:00
|
|
|
defer global.GO_DB.Close()
|
|
|
|
defer global.GO_REDIS.Close()
|
2019-08-07 20:56:20 +08:00
|
|
|
|
2021-03-23 00:55:26 +08:00
|
|
|
initialize.RunServer()
|
2019-08-07 20:56:20 +08:00
|
|
|
|
2021-03-23 00:55:26 +08:00
|
|
|
}
|