docopt/docopt.go — pull request #20 by naoina (2014-08-10 07:29:14+00:00)
Title: add Bind() API

Currently, `Parse()` returns `map[string]interface{}`. It's inconvenience because it needs to do type assertion when using.
So I added Bind API in order to relieves its burden.

Usage:

```go
var option struct {
Command string `docopt:""`
Verbose bool `docopt:"--verbose"`
Other string
}

var usage = `...`

func main() {
args, _ := docopt.Parse(usage, nil, false, "", false)
if err := docopt.Bind(&option, args); err != nil {
log.Fatal(err)
}
fmt.Println(option)
}
```

Also this pull request is one solution of #4.