@@ -50,20 +50,20 @@ var (
5050
5151// NewCommand created a new `daemon` command
5252func NewCommand () * cobra.Command {
53- cmd := & cobra.Command {
53+ daemonCommand := & cobra.Command {
5454 Use : "daemon" ,
5555 Short : tr ("Run as a daemon on port: %s" , configuration .Settings .GetString ("daemon.port" )),
5656 Long : tr ("Running as a daemon the initialization of cores and libraries is done only once." ),
5757 Example : " " + os .Args [0 ] + " daemon" ,
5858 Args : cobra .NoArgs ,
5959 Run : runDaemonCommand ,
6060 }
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
6767}
6868
6969func runDaemonCommand (cmd * cobra.Command , args []string ) {
0 commit comments