haibei/main.go
2025-06-19 10:33:58 +08:00

36 lines
617 B
Go

package main
import (
"github.guxuan/haibei/cmd"
"os"
"github.com/urfave/cli/v2"
)
// Usage: go build -ldflags "-X main.VERSION=x.x.x"
var VERSION = "v1.0.0"
// @title haibei
// @version v1.0.0
// @description 中海小程序
// @securityDefinitions.apikey ApiKeyAuth
// @in header
// @name Authorization
// @schemes http https
// @basePath /
func main() {
app := cli.NewApp()
app.Name = "haibei"
app.Version = VERSION
app.Usage = "中海小程序"
app.Commands = []*cli.Command{
cmd.StartCmd(),
cmd.StopCmd(),
cmd.VersionCmd(VERSION),
}
err := app.Run(os.Args)
if err != nil {
panic(err)
}
}