import ( "fmt" "launchpad.net.gnuflag" ) func main() { fs := flag.NewFlagSetWithEnvPrefix("myapp", "", 0) foo := fs.String("foo", "default", "Foo option") bar := fs.Int("bar", 0, "Bar option") err := fs.Parse(os.Args[1:]) if err != nil { fmt.Println(err) return } fmt.Println("Foo:", *foo) fmt.Println("Bar:", *bar) }In this example, a FlagSet is created with a prefix for environmental variables. Two options, "foo" and "bar", are defined with default values and descriptions. The flag.Parse function is called with the command line arguments (excluding the command itself). The values of the options are then printed to the console. This package library is useful for creating command line tools that require options or arguments to be passed in.