Standard library / flag
flag.FlagSet.ErrorHandling()
Returns the configured parse-error policy. Expected stdout: 'true\n'.
Formal Syntax & Structure
go syntaxgo
func (f *FlagSet) ErrorHandling() ErrorHandlingReturn Value
ErrorHandling
Returns the configured parse-error policy.
Working Example
Example Snippetgo
package main
import ( "flag" "fmt")
func main() { f := flag.NewFlagSet("demo", flag.ContinueOnError) fmt.Println(f.ErrorHandling() == flag.ContinueOnError)}