1. 1

I submitted this code as a pull request to go-arg (https://github.com/alexflint/go-arg) but it was not accepted as the owner want to keep it minimal, so I extracted it into a separate package.

  1.