Note that in the go.mod and go.sum files there are a few other modules listed, which are listed because Go v1.12 and above include the versions of dependencies of the test files as well, to ensure that the entire module can be rebuilt and retested exactly how it was on the developer's workstation.
While I am not a huge fan of listing and requiring test dependencies as if they were production dependencies, it is how the Go module system currently works.
Note that in the
go.mod
andgo.sum
files there are a few other modules listed, which are listed because Go v1.12 and above include the versions of dependencies of the test files as well, to ensure that the entire module can be rebuilt and retested exactly how it was on the developer's workstation.While I am not a huge fan of listing and requiring test dependencies as if they were production dependencies, it is how the Go module system currently works.