diff options
author | Andrew Bonventre <andybons@golang.org> | 2019-03-20 14:20:33 -0400 |
---|---|---|
committer | Andrew Bonventre <andybons@golang.org> | 2019-03-20 18:25:22 +0000 |
commit | fad1b87c54a720b166bbf46d5c5d47ca9aecad47 (patch) | |
tree | ac56733c2177aa5b0eb20ccac96013b61c2889ef | |
parent | 4776f3bcce8b57e5f612247015f23986441498cf (diff) |
blog: update using-go-modules.article
Fixes golang/go#30954
Change-Id: I6aec3d3e54bdcaa12c4e853abe934529e273900b
Reviewed-on: https://go-review.googlesource.com/c/blog/+/168403
Reviewed-by: Jay Conrod <jayconrod@google.com>
-rw-r--r-- | content/using-go-modules.article | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/content/using-go-modules.article b/content/using-go-modules.article index bce1875..24ed2c9 100644 --- a/content/using-go-modules.article +++ b/content/using-go-modules.article @@ -379,13 +379,6 @@ Note that our module now depends on both `rsc.io/quote` and `rsc.io/quote/v3`: rsc.io/quote/v3 v3.1.0 $ -Note that our module now depends on both `rsc.io/quote` and `rsc.io/quote/v3`: - - $ go list -m rsc.io/q... - rsc.io/quote v1.5.2 - rsc.io/quote/v3 v3.1.0 - $ - Each different major version (`v1`, `v2`, and so on) of a Go module uses a different module path: starting at `v2`, the path must end in the major version. In the example, `v3` of `rsc.io/quote` is no longer `rsc.io/quote`: instead, @@ -440,14 +433,14 @@ Reading the docs, we can see that `Hello` has become `HelloV3`: [[https://golang.org/issue/30778][known bug]] in the output; the displayed import path has incorrectly dropped the `/v3`.) -We can update our use of `quote.Hello()` in `hello.go` to use `quoteV3.Hello()`: +We can update our use of `quote.Hello()` in `hello.go` to use `quoteV3.HelloV3()`: package hello import quoteV3 "rsc.io/quote/v3" func Hello() string { - return quoteV3.Hello() + return quoteV3.HelloV3() } func Proverb() string { @@ -462,7 +455,7 @@ so we can undo that: import "rsc.io/quote/v3" func Hello() string { - return quote.Hello() + return quote.HelloV3() } func Proverb() string { |