36 lines
641 B
Go
36 lines
641 B
Go
package main
|
|
|
|
import (
|
|
"os"
|
|
|
|
"github.com/urfave/cli/v2"
|
|
"ifms/cmd"
|
|
)
|
|
|
|
// Usage: go build -ldflags "-X main.VERSION=x.x.x"
|
|
var VERSION = "v1.0.0"
|
|
|
|
// @title ifms
|
|
// @version v1.0.0
|
|
// @description Intelligent Fishery Management System
|
|
// @securityDefinitions.apikey ApiKeyAuth
|
|
// @in header
|
|
// @name Authorization
|
|
// @schemes http https
|
|
// @basePath /
|
|
func main() {
|
|
app := cli.NewApp()
|
|
app.Name = "ifms"
|
|
app.Version = VERSION
|
|
app.Usage = "Intelligent Fishery Management System"
|
|
app.Commands = []*cli.Command{
|
|
cmd.StartCmd(),
|
|
cmd.StopCmd(),
|
|
cmd.VersionCmd(VERSION),
|
|
}
|
|
err := app.Run(os.Args)
|
|
if err != nil {
|
|
panic(err)
|
|
}
|
|
}
|