quick_example.go 352 B

12345678910111213141516
  1. package main
  2. import (
  3. "fmt"
  4. "github.com/docopt/docopt-go"
  5. )
  6. func main() {
  7. usage := `Usage:
  8. quick_example tcp <host> <port> [--timeout=<seconds>]
  9. quick_example serial <port> [--baud=9600] [--timeout=<seconds>]
  10. quick_example -h | --help | --version`
  11. arguments, _ := docopt.Parse(usage, nil, true, "0.1.1rc", false)
  12. fmt.Println(arguments)
  13. }