akamensky / argparse

Argparse for golang. Just because `flag` sucks
MIT License
604 stars 62 forks source link

Error when trying to run example in README.md #12

Closed tehlordvortex closed 6 years ago

tehlordvortex commented 6 years ago

The example in README.md gives the following error when I try to run it:

./main.go:23:25: not enough arguments in call to parser.Command.Usage
    have ()
    want (interface {})

After checking the source code, I passed the err variable to parser.Usage, which resulted in the error being printed twice. So, I presume the fmt.Println call is redundant.

Running: go1.10 on Ubuntu 17.10.1 Linux 64-bit.

akamensky commented 6 years ago

Thanks for the report. The example in README.md was outdated from the very first push to this repo. I've updated it according to current specifications in 00bc810.

Closing.