Hi Chris,
And a couple more quick points regarding some of your other comments...
Regarding your comment about 'Gopkg.lock':
You are correct that 'go mod init' will use a 'Gopkg.lock' as input when it can. In order to help provide a smooth migration to modules, 'go mod init' automatically translates the configuration from a reasonably impressive count of 9 pre-existing dependency managers into an initial go.mod file that produces the equivalent build. You can see the list of config types it understands (which includes dep, glide, govendor, and godep) here:
Regarding your comment about depending on a repo with tagging vs. no tagging:
If you do 'go get foo' (which is the same as 'go get foo@latest'), it will choose the latest tagged semver release of foo, such as v1.2.3. If there are no semver tagged versions at all of foo, get chooses the latest known commit.There is a bit more nuance about whether or not pre-release tags are used, which is spelled out here (but which I'd summarize as "it does what most people would probably expect"):
If instead you add a new import to your source code that is not yet covered by a require in your go.mod, almost any go command (e.g., 'go build') will automatically look up the proper module and add the latest version of that new direct dependency to your module's go.mod as a 'require' directive (where I believe the behavior for determining the latest version in this case is the same as if you had manually run 'go get foo@latest' or 'go get foo').
In any event, that summarizes my personal understanding regarding your questions/comments...
Hope that helps,
--thepudds