-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathmain.go
More file actions
29 lines (26 loc) · 763 Bytes
/
main.go
File metadata and controls
29 lines (26 loc) · 763 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
package main
import (
"github.com/twelvet-s/gins/framework"
"github.com/twelvet-s/gins/framework/global"
"go.uber.org/zap"
)
//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 Gins API
// @version 1.0.0
// @description Gins Swagger
// @securityDefinitions.apikey ApiKeyAuth
// @in header
// @name x-token
// @BasePath /
func main() {
// 初始化Viper
global.Viper = framework.Viper()
// 初始化zap日志库
global.LOG = framework.Zap()
zap.ReplaceGlobals(global.LOG)
// 启动服务
framework.StartServer()
}