4 ms·
The use of `go run` here makes adopting this very hard. The benefit of using Go for projects (in my experience) is that you can build for multiple OS/Arch super
by wyattjoh 10y ago
The use of `go run` here makes adopting this very hard. The benefit of using Go for projects (in my experience) is that you can build for multiple OS/Arch super, super easy. I'd thin that having uploaded artefacts would be the first thing most people do when releasing Go code into the wild that is meant to be consumed by someone just wanting to run the program.
- icholy 10y agogo get github.com/pforemski/dingo
- gouggoug 10y agoI think the point wyattjoh was making is that having to install the go toolchain is hindering adoption and that giving downloadable binaries that you could run directly, like `./dingo` would be nicer.
- zalmoxes 10y agoThats a great point. As a Go developer I always try to make sure that there's a linux and binary for my small projects released on github. I'm surprised more Go devs don't do this. The toolchain makes it very easy to update releases. You can also use ldflags to set the current git revision and branch into the project. Here's an example release.sh I have in most of my projects https://github.com/micromdm/scep/blob/master/cmd/scepclient/release.sh https://github.com/micromdm/scep/blob/master/cmd/scepclient/...
- eropple 10y agoThe literal only selling point for Go, from my perspective--as a software developer, platform engineer, and someone willing to put up with others' Go applications but under no circumstances could be paid enough to write it or fight with its ecosystem--is a statically linked binary deployable. It's not an unmitigated good, of course, for obvious and dependency-related reasons. But it's the only reason to consider a Go tool at all. Otherwise, I might as well be using a Python dependency. Or Ruby or Java.
- j3097736 10y agoBut then you would have to rely on supposedly authentic binaries to run a supposedly secure service.
- eropple 10y agoCryptographic signatures exist.
- 0xdeadbeefbabe 10y agoOh I get it. You finished auditing the linux kernel and can now comment on hn?
- clinta 10y agoIt's also quite easy to set up Travis-CI to build your project and push binaries to github releases on tagged pushes. Pretty much the first thing I do with every go project.
- pjf 10y agoThanks, you can now download binaries at https://github.com/pforemski/dingo/tree/v0.11/release/dingo-0.11 https://github.com/pforemski/dingo/tree/v0.11/release/dingo-...
- pjf 10y agoUpdate: binaries at https://github.com/pforemski/dingo/releases/tag/v0.11 https://github.com/pforemski/dingo/releases/tag/v0.11