mirror of
https://github.com/minio/minio.git
synced 2024-12-26 07:05:55 -05:00
remove debug option
This commit is contained in:
parent
fa11112226
commit
e387e5578d
17
main.go
17
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.ExtraInfo = func() map[string]string {
|
||||
if globalDebugFlag {
|
||||
return getSystemData()
|
||||
app.Before = func(c *cli.Context) error {
|
||||
// get flag and set global defaults here.
|
||||
return nil
|
||||
}
|
||||
return make(map[string]string)
|
||||
app.ExtraInfo = func() map[string]string {
|
||||
return getSystemData()
|
||||
}
|
||||
|
||||
app.RunAndExitOnError()
|
||||
|
Loading…
Reference in New Issue
Block a user