I have been interested in rclone for a while, and have been developing small apps in Go because I hope to one day add a feature or contribute to the source code of rclone. I have a good understanding of Go but still need to work on a few projects to expand my skillset. Go is not my first language.
I was wondering how you get so many binary builds for rclone; would love to replicate this for my projects. I was thinking about using docker (I love docker) or distrobox (not use yet) to set up a build environment via script because if I change the Go environment, to say Fedora or Windows, it does not build (cannot remember error off top of my head). Therefore I am stuck with a binary built for my system - I can also create deb files; I am using Ubuntu.
For a regular developer, however, this is out of scope. Simple "go build" commands normally suffices. Using VSCode with Go extension is the definitive go-to developer setup in my opinion.
Thanks. I will look into the build config. I may have to spend a little time learning GitHub Actions. I am already using GitHub for my projects so shouldn't be too complex to learn.
I am using VSCode too, so I will look at the Go extension too.
Cool. I thought this was just for the C programming language. I will read about this further.
If you want something simple to get started with without needing to spend too much learning about the build process rather than the actual app, you can try using goreleaser instead. Simplifies a lot of the build process and works both locally and on CI environments.
Thanks for this and all input. I have a few great approaches to learn - as with everything in life, whichever is easiest and most efficient for me I will implement. Goreleaser look great.
Goreleaser is a good shout - the rclone build process is very complicated due to needing to build on native macOS and Windows. If you don't use CGO then you can use goreleaser and your life will be a lot simpler!
I use it on a less complicated project than rclone
With a little trial and error and further reading, I have successfully implemented GoReleaser. More to learn but works well at present. Also needed to manually upgrade my Go from 1.18 (in my package manager) to the latest 1.22 for things to work well.