4 ms·
> Not Go at least. You misunderstood the post completely. What? From the post: > The recommended strategy is to develop v2+ modules in a directory named after
by nemetroid 5y ago
> Not Go at least. You misunderstood the post completely.
What? From the post:
> The recommended strategy is to develop v2+ modules in a directory named after the major version suffix.
> …
> We recommend that module authors follow this strategy as long as they have users developing in GOPATH mode.
Although with a reservation, they clearly do recommend it.
- Philip-J-Fry 5y ago"As long as they have users developing in GOPATH mode." It's documentation written when GOPATH was still a widely used for development. I think nowadays it's less of a concern to have a module first code base with GOPATH unsupported. It's nicer to use a V2 branch. Or delegate V1 to a V1 branch and maintain V2 in master.
- nemetroid 5y agoI’m not disputing that things may have changed since the post was written. But the comment I responded to claimed that the linked post didn’t recommend copy-into-subdirectory, which it clearly does.
- s17n 5y agoHow is a branch nicer than a subdirectory? Off the top of my head, it seems like backporting bugfixes might be easier using a branch (if you're lucky, you can just cherrypick the commit and it will work) - any other reasons?