src/server/pkg/cmdutil/env.go
func Main(do func(interface{}) error, appEnv interface{}, decoders ...Decoder) {
	if err := Populate(appEnv, decoders...); err != nil {
		mainError(err)
	}
	if err := do(appEnv); err != nil {
		mainError(err)
	}
	os.Exit(0)
}
func Main(do func(interface{}) error, appEnv interface{}, decoders ...Decoder) {
	if err := Populate(appEnv, decoders...); err != nil {
		mainError(err)
	}
	if err := do(appEnv); err != nil {
		mainError(err)
	}
	os.Exit(0)
}
func Main ( do func ( interface { } ) error , appEnv interface { } , decoders ... Decoder ) { if err := Populate ( appEnv , decoders ... ) ; err != nil { mainError ( err ) } if err := do ( appEnv ) ; err != nil { mainError ( err ) } os . Exit ( 0 ) }
// Main runs the common functionality needed in a go main function.
// appEnv will be populated and passed to do, defaultEnv can be nil
// if there is an error, os.Exit(1) will be called.
Main runs the common functionality needed in a go main function . appEnv will be populated and passed to do defaultEnv can be nil if there is an error os . Exit ( 1 ) will be called .