Refactor 😮💨
This commit is contained in:
26
pkg/cmds/root.go
Normal file
26
pkg/cmds/root.go
Normal file
@ -0,0 +1,26 @@
|
||||
package cmd
|
||||
|
||||
import (
|
||||
"github.com/urfave/cli/v2"
|
||||
"os"
|
||||
"path/filepath"
|
||||
)
|
||||
|
||||
var (
|
||||
appName = filepath.Base(os.Args[0])
|
||||
commonFlag = []cli.Flag{
|
||||
&cli.BoolFlag{
|
||||
Name: "debug",
|
||||
Usage: "Enable debug logging",
|
||||
},
|
||||
}
|
||||
)
|
||||
|
||||
func NewApp() *cli.App {
|
||||
app := cli.NewApp()
|
||||
app.Name = appName
|
||||
app.Usage = "Maps API Service"
|
||||
app.Flags = commonFlag
|
||||
|
||||
return app
|
||||
}
|
Reference in New Issue
Block a user