On Wed, 21 Feb 2018 22:24:38 +0100 Sebastien Binet <[email protected]> wrote:
>
> On Feb 21, 2018 10:11 PM, "Bakul Shah" <[email protected]> wrote:
> >
> > As v2 is only created due to some incompatible change, in my
> > view it is better to have v2 visible in the path. Otherwise
> > it is easy for a reader to get confused when foo.F() in one
> > package (using v1) behaves differently from foo.F() in another
> > package (using v2) as they both will have the same import path
> > and only the "bindings" in their respective go.mod change.
>
> Agreed but it seems a bit of a rather gratuitous constraint to require the
> version to be the last element:
Something like
import "foo" v2
would be mildly preferable to me as
import "foo/v2"
can also refer to version 1 of a package named v2 (as opposed
to version 2 of foo) and the current naming rules continue to
work.
--
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 [email protected].
For more options, visit https://groups.google.com/d/optout.