Our great sponsors
-
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.
-
Mergify
Updating dependencies is time-consuming.. Solutions like Dependabot or Renovate update but don't merge dependencies. You need to do it manually while it could be fully automated! Add a Merge Queue to your workflow and stop caring about PR management & merging. Try Mergify for free.
-
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:
-
SonarLint
Clean code begins in your IDE with SonarLint. Up your coding game and discover issues early. SonarLint is a free plugin that helps you find & fix bugs and security issues from the moment you start writing code. Install from your favorite IDE marketplace today.
-
-
gotestsum
'go test' runner with output optimized for humans, JUnit XML for CI integration, and a summary of the test results.
-
mage
-
earthly
Super simple build framework with fast, repeatable builds and an instantly familiar syntax – like Dockerfile and Makefile had a baby.
earthly
Related posts
- [sema v1.0.0] First Major Version Bump
- //go:generate with ENV variables?
- Mage v1.13 is released - now supports magefiles in a subdir
- Ugly code, improvement suggestions needed
- climate "CLI Mate": a CLI library that autogenerates CLIs from structs / functions with support for nested subcommands, global / local flags, help generation from godocs, typo suggestions, shell completion and more