I just needed to add a go.mod to my repo for the first time to make github.com/markbates/pkger work. Since I only needed the pkger functionality for one particular command in the repo (for now), I put my go.mod in the cmd/<app> folder with that main package.
But that seems to have broken some things. Because I import other packages from the same repo that aren’t merged to master yet it’s not finding some of the exports.
So I’m not sure if I’m supposed to put one go.mod at the top of the repo, or if I should sprinkle go.mod’s around each package folder. And I’m using the word “package” in the way I would before I started reading about modules.
If I’m moving from a repo with a series of packages (including at least two main packages) to modules, do I want one go.mod or many? I can’t figure that out from all the go module blogs and videos I’m consuming.