Place the generated files to the Global GOPATH might limit the different needs of the different project. It would be better to place the files within the project, for example, within the vendor dir. The new golang module system would be tested on the golang 1.11. https://tip.golang.org/doc/go1.11#modules It could be considered on this issue.