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
+6.2k PHP : Get client IP address
+4.7k Golang : How to pass data between controllers with JSON Web Token
+6.3k Golang : Detect face in uploaded photo like GPlus
+19.9k Golang : Count JSON objects and convert to slice/array
+13.6k Android Studio : Password input and reveal password example
+15.2k Golang : Save(pipe) HTTP response into a file
+7.7k Golang : Mapping Iban to Dunging alphabets
+5.2k Responsive Google Adsense
+13.9k Golang : How to check if a file is hidden?
+9.4k Facebook : Getting the friends list with PHP return JSON format
+7.1k Javascript : How to get JSON data from another website with JQuery or Ajax ?
+7.7k Gogland : Where to put source code files in package directory for rookie