Go.mod file in child repos

I’ve seen child repos with a go.mod file, but they don’t always seem to be required. Are there cases where a go.mod file is required in the child repo when using modules? I ask because I haven’t seen anything in the module documentation about requiring one.

I’ve been looking at this one:

Instead of creating many small repositories with 1 module in each (myshortcodes, mypartials etc.) it can be easier to group them in “mono repos”, but version them individually. I think this repo illustrates it better:

The versioning scheme is, admittedly, a little confusing, but if you look at:

You can see that each of those “sub modules” gets versioned individually. This means that when a project depends on one of those and do hugo mod get -u it only downloads the one that has a changed version.

So, they’re not required, but can be practical sometimes.