1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36
|
package main
import (
"github.com/docopt/docopt-go/examples"
)
func Example() {
examples.TestUsage(usage, "counted -vvvvvvvvvv")
examples.TestUsage(usage, "counted go go")
examples.TestUsage(usage, "counted --path ./here --path ./there")
examples.TestUsage(usage, "counted this.txt that.txt")
// Output:
// --help false
// --path []
// -v 10
// <file> []
// go 0
//
// --help false
// --path []
// -v 0
// <file> []
// go 2
//
// --help false
// --path [./here ./there]
// -v 0
// <file> []
// go 0
//
// --help false
// --path []
// -v 0
// <file> [this.txt that.txt]
// go 0
}
|