Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
preseinger
on April 12, 2022
|
parent
|
context
|
favorite
| on:
Get familiar with workspaces
> There's a couple of repos at work which contain multiple Go modules (each in their own subdirectory, with their own go.mod files).
There's almost no reason to do this. 1 repo = 1 module. Even for monorepos.
gkfasdfasdf
on April 12, 2022
[–]
Can you elaborate? What if you have multiple commands (main.go) with differing dependencies?
preseinger
on April 17, 2022
|
parent
[–]
They can (and usually should) exist in a single module. Each compiled artifact will link in only the dependencies it requires, not all of the dependencies of the parent module.
Consider applying for YC's Summer 2026 batch! Applications are open till May 4
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search:
There's almost no reason to do this. 1 repo = 1 module. Even for monorepos.