docopt-go for it!

21 Apr 2014

go import ""

Don't write parser code: a good help message already has all the necessary information in it.

That is the philosophy of docopt in a nutshell.

Back during the Stone Age of Deis—almost eight lunar months ago—I was enthused about docopt for Python. Think about what commands and options your tool needs, type them out into docstrings, and you're basically done with the user input and validation side of things.

We Deis maintainers are enthusiastic Gophers as well as Pythoneers. So I'm doubly glad we chose docopt, because the docopt-go package for Go makes porting the deis CLI from Python to Go much easier.

As of today the Deis team is helping maintain the docopt-go project on GitHub. Recent improvements include:

  • go get now works
  • no os.Exit() if optional parameter exit is false
  • tests run at Travis CI
  • docs hosted at

I'll be among the Deis project attendees at GopherCon this week, so please ask me about docopt-go!

Posted in Deis v1 PaaS

triangle square circle

Did you enjoy this post?