[golang] How to use github for hosting self-updating binaries for your golang projects

go build -ldflags="-X main.version=1.1" -o hello-updater src/hello-updater/main.go
go-selfupdate -o public/hello-updater/ hello-updater 1.1
go build -ldflags="-X main.version=1.2" -o hello-updater src/hello-updater/main.go
go-selfupdate -o public/hello-updater/ hello-updater 1.2

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Sarvsav Sharma

Sarvsav Sharma

Started writing code in GoLang. Enjoys working on Microservices and Distributes Systems. Project: learnyougo, inspired from learnyounode. github: sarvsav