From d407c753c5f235fd5505cf2ea6d012a08c370afe Mon Sep 17 00:00:00 2001 From: Harshavardhana Date: Sun, 19 Apr 2015 22:44:10 -0700 Subject: [PATCH] Add a new --retry flag to change default retry count --- cmd-options.go | 5 +++++ main.go | 1 + 2 files changed, 6 insertions(+) diff --git a/cmd-options.go b/cmd-options.go index 45e78e84..03ef63b3 100644 --- a/cmd-options.go +++ b/cmd-options.go @@ -223,5 +223,10 @@ var ( Name: "quiet, q", Usage: "Supress chatty console output", }, + cli.IntFlag{ + Name: "retry", + Usage: "Number of retry count", + Value: 5, + }, } ) diff --git a/main.go b/main.go index f964b892..2ca951f3 100644 --- a/main.go +++ b/main.go @@ -82,6 +82,7 @@ func main() { app.Before = func(ctx *cli.Context) error { globalQuietFlag = ctx.GlobalBool("quiet") globalDebugFlag = ctx.GlobalBool("debug") + globalMaxRetryFlag = ctx.GlobalInt("retry") if globalDebugFlag { app.ExtraInfo = getSystemData() } else {