Our great sponsors
-
WorkOS
The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.
-
InfluxDB
Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
-
gotestsum
'go test' runner with output optimized for humans, JUnit XML for CI integration, and a summary of the test results.
-
earthly
Super simple build framework with fast, repeatable builds and an instantly familiar syntax – like Dockerfile and Makefile had a baby.
Mage is good, I've never tried https://taskfile.dev/ but it looks very similar. This is where I give the Ruby community props, Rake really set the tone for the whole a-make-equivalent-but-better-in-your-code's-language movement. Python has Invoke, Javascript has a number of similar tools as well.
I started with golang a little under 5 months ago and I've been noticing that a lot of golang projects use makefile! Even the standard project layout template on GitHub has a makefile as part of the template.
IMO, using make in a go project seems kinda pointless because the go compiler can already build and manage dependencies of go projects. It can also run go:generate commands found in files. This means what you need (short of a shell script) is a way to run tasks and maybe create dependencies between the tasks, and just is more than capable of doing this, as well as many others.
I think that Make is so popular, because Go comes from C. Many C and C++ devs migrated to Go. Personally, I created goyek as an alternative.
May I present my alternative https://github.com/Roemer/gotaskr It is kind of similar to magefile but provides some other features similar to cake build and inbuilt tools useful for devops. And also it is a plain go program so no magic compilation in the background. It replaced basically 100 bash files in our rather complex build/deploy setup. Sometimes a declarative approach is just not enough.
Shameless plug for a tool I wrote: Spok
Our project does have extensive makefile broken down into individual files so it is more readable. As you can see, we have targets for database, code quality, modules, testing, client generation, OpenAPI etc. It also has a trivial help:
mage
earthly