I don't think changing the module name would be a good idea for singletons 
tho. 
And having a v0 has the added benefit of using newer codes while 
maintaining backwards compatible API.
So no more backporting and all the mess of having multiple branches.

On Thursday, February 22, 2018 at 1:49:53 PM UTC+8, Sam Whited wrote:
>
> On Wed, Feb 21, 2018, at 22:35, alex....@gmail.com <javascript:> wrote: 
> > vgo suggested that package developers put the major version into the 
> import 
> > path e.g. foo/v1. 
> > However dealing with a VCS like git, this thought occur to me, what 
> would 
> > it look like when the project needs to move from v1 to v2? 
>
> This wasn't clear to me either, but it was pointed out that you can just 
> change the "module" line in your go.mod file, eg. 
>
>     module "example.net/mypackage/v2" 
>
> and you don't have to actually create a /v2 tree or move your code around 
> at all. 
>
> —Sam 
>

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to