There is a better tool for listing packages https://github.com/uudashr/gopkgs/ we can get rid of a few hundred lines of code