package cmd import ( "flag" "fmt" ) func Diff(params []string) { flags := flag.NewFlagSet("diff", flag.ExitOnError) var walk bool const WALK_HELP = "walk backwards through the diff history" flags.BoolVar(&walk, "walk", false, WALK_HELP); flags.BoolVar(&walk, "w", false, WALK_HELP); flags.Parse(params); fmt.Printf("Your flag is: %t", walk); }