Go tip: use the flag package for a []string

This gist shows exactly what you need to do. It wasn’t immediately obvious at first, the docs on this particular function in the flag package are not particularly helpful for the uninitiated, though in retrospect they now make sense 🙂

Leave a Reply