mage
provisioning-backend
mage | provisioning-backend | |
---|---|---|
9 | 12 | |
3,890 | 13 | |
0.5% | - | |
5.0 | 9.2 | |
3 months ago | 21 days ago | |
Go | Go | |
Apache License 2.0 | GNU General Public License v3.0 only |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
mage
-
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
mage being a build tool and climate being a CLI library, a direct comparison probably doesn't make much sense but their parsing (https://github.com/magefile/mage/blob/master/parse/parse.go) seems very similar to what I'm doing for metadata (param names / godocs / comments etc.).
-
Is your makefile supposed to be a justfile?
mage
-
Anyone else doing compiler work in Golang?
https://github.com/magefile/mage but I haven't tried it as am not a fun of make like tools.
-
Do we have a package.json/scripts section alternative in Golang?
I prefer https://github.com/magefile/mage
-
[sema v1.0.0] First Major Version Bump
We now use mage to cross-compile release binaries as proposed by u/g00py3 in this Reddit discussion.
-
//go:generate with ENV variables?
Try github.com/magefile/mage - it's written in Go and lets you write Go to run scripts rather than writing bash inside yaml ;)
-
Mage v1.13 is released - now supports magefiles in a subdir
Mage v1.13 was released as of yesterday. This included a few small fixes, and a big new feature - subdirectory support.
-
Ugly code, improvement suggestions needed
If you need build automation, use mage.
provisioning-backend
-
[Question] How do you guys separate your tooling for different version
I wrote a makefile which installs tools into PROJDIR/bin which is also in the gitignore.
-
Instrument a third party package
Extremely simple in go, you just implement what is called Doer interface (one method). Here is an example from one of my projects, it is a simple decorator with logger in this case. Then you just initialize the client with this instance, in my project it is slightly more complex because I also setup OpenTelemetry but you get the idea.
-
Can you really build a complete restful service without any frameworks?
Authentication and authorization is typically just a middleware which is essentially a function. Recently I implemented a RBAC functionality into our microservice which does not use any big framework. On our platform we have a RBAC service we need to call via REST. As you can see the whole patch is small if you exclude the generated OpenAPI client.
- In-memory key value store
-
Repository with sqlc, how to hide transactions?
We use DAO/DAL in our app and I ran into the same problem - DAO does not work well with transactions. We have our own WithTransaction function which is currently only used within one model and that works fine. But the problem appears when we want to do a transaction across several models - that needs to be done in the business (service) layer.
-
Is your makefile supposed to be a justfile?
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:
-
Any references for open source mini workflow libraries or systems written in Go?
Here is our code: https://github.com/RHEnVision/provisioning-backend/tree/main/pkg/worker
- Want to know if this is a valid approach
- Cache headers when serving embedded files
-
When to use a queue library or straight redis?
Our solution is simply one Redis queue, jobs have "type" (string) and are marshalled via Gob (for type safety) and there is no return value from job or error. This makes things extremely easy. We keep statistics (metrics) of job queue size and "in flight" jobs. Here is our implementation, just for inspiration. I suggest to write this on your own: https://github.com/RHEnVision/provisioning-backend/tree/main/pkg/worker
What are some alternatives?
Cockatrice - A cross-platform virtual tabletop for multiplayer card games
goyek - Task automation Go library
spok - It's a build system Jim, but not as we know it 🖖
taskflow - Create build pipelines in Go [Moved to: https://github.com/goyek/goyek]
weaver - Programming framework for writing and deploying cloud applications.
PacketProxy - A local proxy written in Java
earthly - Super simple build framework with fast, repeatable builds and an instantly familiar syntax – like Dockerfile and Makefile had a baby.
HattrickOrganizer - Assistant for Hattrick online football manager
dejq - Very Simple Job Queue
symphony-of-empires - Symphony of the Empires is a RTS strategy game and map game.
magarena - Magarena is a single-player fantasy card game played against a computer opponent.