package main import ( "fmt" "github.com/docopt/docopt-go" ) func main() { usage := `Usage: quick_example tcp [--timeout=] quick_example serial [--baud=9600] [--timeout=] quick_example -h | --help | --version` arguments, _ := docopt.Parse(usage, nil, true, "0.1.1rc", false) fmt.Println(arguments) }