-
Notifications
You must be signed in to change notification settings - Fork 524
/
main.go
35 lines (31 loc) · 837 Bytes
/
main.go
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
30
31
32
33
34
35
package main
import (
"os"
"github.com/LyricTian/gin-admin/v10/cmd"
"github.com/urfave/cli/v2"
)
// Usage: go build -ldflags "-X main.VERSION=x.x.x"
var VERSION = "v10.1.0"
// @title ginadmin
// @version v10.1.0
// @description A lightweight, flexible, elegant and full-featured RBAC scaffolding based on GIN + GORM 2.0 + Casbin 2.0 + Wire DI.
// @securityDefinitions.apikey ApiKeyAuth
// @in header
// @name Authorization
// @schemes http https
// @basePath /
func main() {
app := cli.NewApp()
app.Name = "ginadmin"
app.Version = VERSION
app.Usage = "A lightweight, flexible, elegant and full-featured RBAC scaffolding based on GIN + GORM 2.0 + Casbin 2.0 + Wire DI."
app.Commands = []*cli.Command{
cmd.StartCmd(),
cmd.StopCmd(),
cmd.VersionCmd(VERSION),
}
err := app.Run(os.Args)
if err != nil {
panic(err)
}
}