format: use group style variable declaration to define cli flags
This commit is contained in:
parent
e2ab19066d
commit
d69a4bec10
1 changed files with 8 additions and 5 deletions
|
@ -13,12 +13,15 @@ import (
|
|||
"git.smsvc.net/pomodoro/GoTomato/pkg/models"
|
||||
)
|
||||
|
||||
var (
|
||||
// Define CLI flags
|
||||
listenAddress = flag.String("listenAddress", shared.DefaultServerConfig.ListenAddress, "IP address to listen on")
|
||||
listenPort = flag.Int("listenPort", shared.DefaultServerConfig.ListenPort, "Port to listen on")
|
||||
password = flag.String("password", "", "Control password for pomodoro session (optional)")
|
||||
showVersionFlag = flag.Bool("version", false, "Output version")
|
||||
)
|
||||
|
||||
func Start() {
|
||||
// Define CLI flags for ListenAddress and ListenPort
|
||||
listenAddress := flag.String("listenAddress", shared.DefaultServerConfig.ListenAddress, "IP address to listen on")
|
||||
listenPort := flag.Int("listenPort", shared.DefaultServerConfig.ListenPort, "Port to listen on")
|
||||
password := flag.String("password", "", "Control password for pomodoro session (optional)")
|
||||
showVersionFlag := flag.Bool("version", false, "Output version")
|
||||
flag.Parse()
|
||||
|
||||
if *showVersionFlag {
|
||||
|
|
Loading…
Reference in a new issue