Hi Justin,
> So, I was hoping to introduce the go.mod in a way that didn't involve changing my import paths. While I see how this now works... going back to my original question, is there a way to introduce Go modules to an existing v2 project in a way that won't break it for non-module-aware Go versions? If I were to make the required changes to the import paths, adding in "v2", wouldn't this break usages outside of Go modules? Now my sub-packages reference "v2" in the import path, which only makes senes to go.mod. If someone is vendored to a specific commit, then they should be fine when cloning it. But it would seem like go 1.10 would break, since there would be no physical "v2" location. Does that mean I really would need to copy everything into a v2 subdirectory to prevent breakage?
Go 1.10.3 and 1.9.7 were released for exactly this reason; they are
sufficiently aware of versioned import paths to know what to do. That
way you can safely create modules with v >= 2 (because that's when
versioned import paths become significant) and have 1.10.3 and 1.9.3
still work as they did before.
Paul