aboutsummaryrefslogtreecommitdiff
path: root/_content/doc/gopath_code.html
diff options
context:
space:
mode:
authorHana <hyangah@gmail.com>2021-09-03 09:56:26 -0400
committerHyang-Ah Hana Kim <hyangah@gmail.com>2021-09-03 14:47:29 +0000
commitddb58f2a774bb611e4a2f5ed07fe936e19752abb (patch)
tree9e31415e939ef6ca4fbc3ae471448da0e4227d3e /_content/doc/gopath_code.html
parent32d2054556308d1bc5b370cbd4edaea75b027e72 (diff)
downloadgo-x-website-ddb58f2a774bb611e4a2f5ed07fe936e19752abb.tar.xz
all: replace the example repo import path
github.com/golang/example is actually a mirror of go.googlesource.com/example which hosts the golang.org/x/example module. The path mismatches causes build failures. This CL replaces github.com/golang/example with golang.org/x/example when appropriate. I think the use case in _content/doc/articles/go_command.html is better served with a repo in github.com or widely known source hosting sites. Otherwise, the flow may be confusing. So, I used github.com/golang/protobuf. Also replaced godoc.org links with pkg.go.dev links. Still not sure if the instructions in the old blog posts and articles continue to work though. For blog posts, I am not sure what to do - there is historical merit in preserving old contents (that's the point of blogs, isn't it?) However, old, broken examples can be confusing for new users. Keeping all blog posts up-to-date isn't scalable either. The gopath_code.html and go_command.html can be confusing for users who use latest go. I think we need to make them more clear that they are obsolete or archive(?) them. Change-Id: Iefe0cc94b0690dc52933ebce214104e94d9b6808 Reviewed-on: https://go-review.googlesource.com/c/website/+/347551 Trust: Hyang-Ah Hana Kim <hyangah@gmail.com> Run-TryBot: Hyang-Ah Hana Kim <hyangah@gmail.com> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Russ Cox <rsc@golang.org> Website-Publish: Russ Cox <rsc@golang.org>
Diffstat (limited to '_content/doc/gopath_code.html')
-rw-r--r--_content/doc/gopath_code.html10
1 files changed, 5 insertions, 5 deletions
diff --git a/_content/doc/gopath_code.html b/_content/doc/gopath_code.html
index 87891f1b..2ce9d305 100644
--- a/_content/doc/gopath_code.html
+++ b/_content/doc/gopath_code.html
@@ -76,7 +76,7 @@ bin/
hello # command executable
outyet # command executable
src/
- <a href="https://github.com/golang/example/">github.com/golang/example/</a>
+ <a href="https://golang.org/x/example">golang.org/x/example/</a>
.git/ # Git repository metadata
hello/
hello.go # command source
@@ -538,13 +538,13 @@ revision control system such as Git or Mercurial. The <code>go</code> tool uses
this property to automatically fetch packages from remote repositories.
For instance, the examples described in this document are also kept in a
Git repository hosted at GitHub
-<code><a href="https://github.com/golang/example">github.com/golang/example</a></code>.
+<code><a href="https://golang.org/x/example">golang.org/x/example</a></code>.
If you include the repository URL in the package's import path,
<code>go get</code> will fetch, build, and install it automatically:
</p>
<pre>
-$ <b>go get github.com/golang/example/hello</b>
+$ <b>go get golang.org/x/example/hello</b>
$ <b>$GOPATH/bin/hello</b>
Hello, Go examples!
</pre>
@@ -565,7 +565,7 @@ tree should now look like this:
bin/
hello # command executable
src/
- github.com/golang/example/
+ golang.org/x/example/
.git/ # Git repository metadata
hello/
hello.go # command source
@@ -589,7 +589,7 @@ package, too.
</p>
<pre>
-import "github.com/golang/example/stringutil"
+import "golang.org/x/example/stringutil"
</pre>
<p>