From e387e5578ddb16d9dd7c07a02dfa0910861ae34e Mon Sep 17 00:00:00 2001 From: "Anand Babu (AB) Periasamy" Date: Wed, 9 Sep 2015 12:46:20 -0700 Subject: [PATCH] remove debug option --- main.go | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/main.go b/main.go index d43dcf81c..4b2bddbb0 100644 --- a/main.go +++ b/main.go @@ -29,8 +29,6 @@ import ( "github.com/minio/cli" ) -var globalDebugFlag = false - func init() { // Check for the environment early on and gracefuly report. _, err := user.Current() @@ -131,22 +129,17 @@ VERSION: return app } -func registerBefore(c *cli.Context) error { - globalDebugFlag = c.GlobalBool("debug") - return nil -} - func main() { // set up go max processes runtime.GOMAXPROCS(runtime.NumCPU()) app := registerApp() - app.Before = registerBefore + app.Before = func(c *cli.Context) error { + // get flag and set global defaults here. + return nil + } app.ExtraInfo = func() map[string]string { - if globalDebugFlag { - return getSystemData() - } - return make(map[string]string) + return getSystemData() } app.RunAndExitOnError()