From 1cbb4094b173f00e2b4bff015888e0ca716d76af Mon Sep 17 00:00:00 2001 From: rigelrozanski Date: Mon, 9 Oct 2017 05:18:40 -0400 Subject: [PATCH] simplify tick start command --- server/commands/start.go | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/server/commands/start.go b/server/commands/start.go index da58520714..3804d13e48 100644 --- a/server/commands/start.go +++ b/server/commands/start.go @@ -31,9 +31,15 @@ var StartCmd = &cobra.Command{ } // InitTickStartCmd - initialize a command as the start command with tick -func InitTickStartCmd(tick app.Ticker, cmd *cobra.Command) { - cmd.RunE = tickStartCmd(tick) - addStartFlag(cmd) +func InitTickStartCmd(tick app.Ticker) *cobra.Command { + startCmd := &cobra.Command{ + Use: "start", + Short: "Start this full node", + RunE: startCmd, + } + startCmd.RunE = tickStartCmd(tick) + addStartFlag(startCmd) + return startCmd } // nolint TODO: move to config file