package setting import ( "fmt" "github.com/urfave/cli/v2" ) var ( colorGreen = "\033[01;32m" colorReset = "\033[0m" HelpTemplate = "\033[01;32m{{.Name}}\033[0m: {{.Usage}}\n\n" + "Usage: {{.Name}} [options] [filepath]\n" + " command | {{.Name}} [options]\n\n" + "This command can take a file or standard in as input\n\n" + "Options:\n" + "{{range .VisibleFlags}}{{.}}\n" + "{{end}}" ) func VersionTemplate(c *cli.Context) { fmt.Printf("%s%s%s version %s\n\n%s\n", colorGreen, c.App.Name, colorReset, c.App.Version, c.App.UsageText) }