3 ms·
Ask HN: How do you build your Golang based repo ?
Do you use Makefiles with Glide, dep, or other vendoring tools or are you experimenting with something else like Bazel ? What has been your experience ?
- mbertschler 9y agoI moved from typical `build.sh` files to a small Go program that does more than just building. It also manages connected services as Docker containers, database imports and so on. For vendoring I moved all my projects to dep.
- indescions_2017 9y agoYou can ask 100 gophers. And obtain 100 different workflows ;) I like to separate design and code, from build and test, from deploy and monitoring. And I like change. And experimenting with new techniques. dep is definitely next, as well as prometheus. The things that determine what tools you use are often external to language design itself. How your remote team handles its gitflow. Whether people prefer vim on a remote dev instance or Atom locally with github integration. Are you targeting app engine or container engine. Regardless of the heterogeneity, having a canonical $GOROOT source tree and deploying binaries makes things much more flexible. I'll just point to one recent discovery that is helping a lot at the moment and may be useful to other people: godoc for static analysis https://golang.org/lib/godoc/analysis/help.html https://golang.org/lib/godoc/analysis/help.html
- smeriwether 9y agoWe do a decent amount of go at the company I work for. We started out using Makefiles (2 or so years ago) then moved everything to Glide and now we use Dep. Makefiles weren’t fun to deal with so I advise against that. We moved to Dep because we feel that is what the community is converging on. There is no great solution unfortunately. As long as you are able to live with some of the small downsides with any vendoring solution then really any would work.
- artpar 9y agoI am using glide with a small Makefile + goreleaser You can check it out here: https://github.com/artpar/daptin https://github.com/artpar/daptin The build scripts are located here: https://github.com/daptin/daptin/tree/master/scripts https://github.com/daptin/daptin/tree/master/scripts The current setup is recognised by travis and semaphoreci.