format: use group style variable declaration to define cli flags
This commit is contained in:
parent
7b0c0df477
commit
f5f51711a1
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