@@ -50,20 +50,20 @@ var (
50
50
51
51
// NewCommand created a new `daemon` command
52
52
func NewCommand () * cobra.Command {
53
- cmd := & cobra.Command {
53
+ daemonCommand := & cobra.Command {
54
54
Use : "daemon" ,
55
55
Short : tr ("Run as a daemon on port: %s" , configuration .Settings .GetString ("daemon.port" )),
56
56
Long : tr ("Running as a daemon the initialization of cores and libraries is done only once." ),
57
57
Example : " " + os .Args [0 ] + " daemon" ,
58
58
Args : cobra .NoArgs ,
59
59
Run : runDaemonCommand ,
60
60
}
61
- cmd .PersistentFlags ().String ("port" , "" , tr ("The TCP port the daemon will listen to" ))
62
- configuration .Settings .BindPFlag ("daemon.port" , cmd .PersistentFlags ().Lookup ("port" ))
63
- cmd .Flags ().BoolVar (& daemonize , "daemonize" , false , tr ("Do not terminate daemon process if the parent process dies" ))
64
- cmd .Flags ().BoolVar (& debug , "debug" , false , tr ("Enable debug logging of gRPC calls" ))
65
- cmd .Flags ().StringSliceVar (& debugFilters , "debug-filter" , []string {}, tr ("Display only the provided gRPC calls" ))
66
- return cmd
61
+ daemonCommand .PersistentFlags ().String ("port" , "" , tr ("The TCP port the daemon will listen to" ))
62
+ configuration .Settings .BindPFlag ("daemon.port" , daemonCommand .PersistentFlags ().Lookup ("port" ))
63
+ daemonCommand .Flags ().BoolVar (& daemonize , "daemonize" , false , tr ("Do not terminate daemon process if the parent process dies" ))
64
+ daemonCommand .Flags ().BoolVar (& debug , "debug" , false , tr ("Enable debug logging of gRPC calls" ))
65
+ daemonCommand .Flags ().StringSliceVar (& debugFilters , "debug-filter" , []string {}, tr ("Display only the provided gRPC calls" ))
66
+ return daemonCommand
67
67
}
68
68
69
69
func runDaemonCommand (cmd * cobra.Command , args []string ) {
0 commit comments