The recommended strategy is to develop v2+ modules in a directory named after the major version suffix.
github.com/googleapis/gax-go @ master branch
/go.mod → module github.com/googleapis/gax-go
/v2/go.mod → module github.com/googleapis/gax-go/v2
Which is quite irritating. Go is suggesting to copy the entire code base into a v2 dir to deal with go-modules.
Following https://go.dev/blog/v2-go-modules
Which is quite irritating. Go is suggesting to copy the entire code base into a v2 dir to deal with go-modules.