Golang flag.FlagSet.SetOutput() function example
package flag
SetOutput sets the destination for usage and error messages. If output is nil, os.Stderr is used.
Golang flag.FlagSet.SetOutput() function usage example
f := flag.NewFlagSet("", flag.ContinueOnError)
f.SetOutput(ioutil.Discard) // send all usage and error messages to blackhole
Reference :
Advertisement
Something interesting
Tutorials
+9.4k Golang : How to protect your source code from client, hosting company or hacker?
+7.1k Golang : Get Alexa ranking data example
+7k Golang : How to call function inside template with template.FuncMap
+10.2k Golang : Bcrypting password
+9.1k Golang : io.Reader causing panic: runtime error: invalid memory address or nil pointer dereference
+3.4k Golang : Fix go-cron set time not working issue
+4.9k Javascript : How to get width and height of a div?
+16.4k CodeIgniter/PHP : Create directory if does not exist example
+20.9k Golang : Convert PNG transparent background image to JPG or JPEG image
+3.7k Java : Random alphabets, alpha-numeric or numbers only string generator
+14.4k Golang : How to convert a number to words