August 23rd, 2024

Show HN: Monogo – Evolve your go workspace to a real monorepo

Monogo is a CLI tool for managing Go workspace monorepos, facilitating dependency management, code formatting, and testing. It offers various commands and flags to enhance functionality for developers.

Read original articleLink Icon
Show HN: Monogo – Evolve your go workspace to a real monorepo

Monogo is a command-line interface (CLI) tool tailored for managing Go workspace monorepos, functioning as a configuration-free companion similar to Turborepo but specifically designed for the Go programming language. Users can install Monogo by cloning its GitHub repository and building the binary with the command `go install github.com/nicolasgere/monogo@latest`. The tool offers several commands to facilitate the management of Go modules, including installing dependencies, formatting modules, and running tests. Each command supports common flags such as `--target` to specify a module, `--dependency` to include all dependencies, `--branch` for comparing branches, and `--path` to define the working directory. Monogo is particularly beneficial for developers working with Go monorepos, as it streamlines the processes of dependency management, code formatting, and testing across multiple modules.

- Monogo is a CLI tool for managing Go workspace monorepos.

- Installation is done via cloning the repository and using a specific Go command.

- Key commands include installing dependencies, formatting modules, and running tests.

- Common flags enhance command functionality, allowing for targeted operations.

- The tool is designed to improve efficiency for developers working with multiple Go modules.

Link Icon 3 comments
By @TheDong - about 2 months
It's surprising the go tooling doesn't have a more native way to do something like this already. Upstream issue: https://github.com/golang/go/issues/50745

Like, go already has test caching (so "only test stuff that changed" shouldn't be necessary, that should just happen), and code formatting and such is already quite fast...

Overall, I feel like having another tool which parses my go source code is going to be slower than writing a Makefile to wrap:

    go list -f '{{.Dir}}' -m | xargs -L1 go test ./...
which is all this tool doing really.

Also, hilariously, the repo isn't go fmt'd [0], despite being a tool to go fmt your repo. That's really funny, but I don't think the go community is ready for that level of humor yet, maybe one day.

[0]: https://github.com/nicolasgere/monogo/blob/2fb0b4985893e3397...

By @hahn-kev - about 2 months
If this is not related to Mongo Db why is the name so similar?