Standard library / flag

flag.CommandLine

Default global flag set; package functions delegate to it. Prefer independent sets in reusable code. Expected stdout: 'true\n'.

Formal Syntax & Structure

go syntaxgo
var CommandLine *FlagSet

Working Example

Example Snippetgo
package main
import (  "flag"  "fmt")
func main() { fmt.Println(flag.CommandLine.ErrorHandling() == flag.ExitOnError) }
Go Reference