package main import ( "fmt" "github.com/codegangsta/cli" ) func main() { app := cli.NewApp() app.Flags = []cli.Flag{ cli.StringFlag{ Name: "greeting", Value: "Hello", Usage: "Greeting to use in command output", }, } app.Action = func(c *cli.Context) error { greeting := c.GlobalString("greeting") fmt.Println(greeting, "world!") return nil } app.Run(os.Args) }In this example, we create a new CLI application using the cli package, and define a global string flag called "greeting". When the application runs, it prints the value of the greeting flag followed by "world!". For example, if we run the application with the command "myapp --greeting=Hola", the output will be "Hola world!".