package main import ( "fmt" "github.com/codegangsta/cli" ) func main() { app := cli.NewApp() app.Flags = []cli.Flag{ &cli.BoolFlag{Name: "verbose", Usage: "Enable verbose logging."}, } app.Action = func(c *cli.Context) error { if c.Bool("verbose") { fmt.Println("Verbose logging enabled.") } else { fmt.Println("Verbose logging disabled.") } return nil } err := app.Run(os.Args) if err != nil { fmt.Println(err) } }In this example, the user can set the `verbose` flag to `true` or `false` when executing the command. The `cli.BoolFlag` struct represents the `verbose` flag, and the `c.Bool("verbose")` function call returns its value. Based on whether the `verbose` flag is set or not, the program will output a different message.