Gomo is a Simple Golang multi modules tool. inspired from turborepo
Installation ⬇
Using script
- Shell
curl -sL https://bit.ly/gomo-cli | bash
- PowerShell
iwr -useb https://bit.ly/gomo-win | iex
then restart your powershell
Homebrew
brew install abdfnx/tap/gomo
Usage
- Creates a new gomo.json file in the current folder
gomo init
- Initialize a new module
gomo init --mod github.com/x/x2 --path dir
- Download go packages through all your modules
gomo
- Get a go package and add it through all modules
gomo get github.com/gorilla/mux
- Delete a go package through all modules
gomo delete github.com/example/example1
- Update all packages
gomo update
- Add any missing packages necessary to build all your modules
gomo tidy
Gomo config file
{
"cmds": {
"download": "go mod download",
"update": "go get -u"
},
"modules": [
".",
"test",
"test/web"
]
}
thank you for your time and don't forgot to star the repo if you like it
Top comments (3)
So it's just a wrapper round
go mod
? What's the point?so, let's say you have more than a module in one repo, and you want to install all packages in these modules, instead of run
go mod
in every single module. just rungomo
.it's like when you have a javascript monorepo with
nx
orturborepo
👍.Ahh okay I getcha - I don't do JS :D
Although I think having multiple modules in one repo goes against the Go way..? Maybe if they're all related I guess?