package main import ( "fmt" "os" "github.com/urfave/cli" ) func main() { app := cli.NewApp() app.Name = "myapp" app.Usage = "do something useful" app.Commands = []cli.Command{ { Name: "add", Usage: "add two numbers", Flags: []cli.Flag{ cli.IntFlag{ Name: "number", Usage: "enter a number to add to another number", }, }, Action: func(c *cli.Context) error { if c.IsSet("number") { num := c.Int("number") result := num + c.Int("numberTwo") fmt.Println(result) } return nil }, }, } err := app.Run(os.Args) if err != nil { fmt.Println(err) } }In this example, the `add` command has an `IntFlag` named `number` that can be set by the user. The `Action` function takes a `Context` parameter, which has access to the `number` flag value using the `Int` method. The value is then added to a second value (`numberTwo`, assumed to be defined elsewhere), and the sum is printed to the console. Overall, the `github.com/urfave/cli` package is a powerful and flexible library for building and parsing command-line interfaces in Go. Its `Context` type allows you to easily pass information between functions and manage state in your application.