From f81f4f7f21d45f2e62f8dbcf84e0fd5d7b2785a3 Mon Sep 17 00:00:00 2001 From: Russ Cox Date: Fri, 14 Jan 2022 12:53:28 -0500 Subject: [PATCH] _content: remove some https://go.dev/ prefixes in links The site is served at both go.dev and golang.google.cn. In China, only golang.google.cn can serve, so we try to use relative links to avoid pointing users to the copy they can't access. Periodically we have to remove prefixes that have crept in. This commit applies today's round of that. Change-Id: Iaa169635664d0562a1cccc57c3e02b687b3493e7 Reviewed-on: https://go-review.googlesource.com/c/website/+/378597 Trust: Russ Cox Run-TryBot: Russ Cox TryBot-Result: Gopher Robot Reviewed-by: DO NOT USE Trust: DO NOT USE --- _content/blog/tutorials-go1.18.md | 10 +++++----- _content/doc/fuzz/index.md | 2 +- _content/doc/tutorial/fuzz.md | 4 ++-- _content/doc/tutorial/generics.md | 4 ++-- _content/tour/concurrency.article | 6 +++--- 5 files changed, 13 insertions(+), 13 deletions(-) diff --git a/_content/blog/tutorials-go1.18.md b/_content/blog/tutorials-go1.18.md index 6d90b4ce..f4118444 100644 --- a/_content/blog/tutorials-go1.18.md +++ b/_content/blog/tutorials-go1.18.md @@ -11,7 +11,7 @@ for Go. We have published two new tutorials to help introduce you to these upcoming features. The first new [tutorial will help you get started with -generics](https://go.dev/doc/tutorial/generics). This tutorial walks you through +generics](/doc/tutorial/generics). This tutorial walks you through creating a generic function that can handle multiple types, and calling it from your code. Once you’ve created a generic function, you’ll learn about type constraints, and write some for your function. Also consider checking out the @@ -19,21 +19,21 @@ constraints, and write some for your function. Also consider checking out the generics](https://www.youtube.com/watch?v=35eIxI_n5ZM&t=1755s) to learn more. The second new [tutorial will help you get started with -fuzzing](https://go.dev/doc/tutorial/fuzz). This tutorial demonstrates how +fuzzing](/doc/tutorial/fuzz). This tutorial demonstrates how fuzzing can find bugs in your code, and walks through the process of diagnosing and fixing the issues. In this tutorial, you will write code that has a few bugs and use fuzzing to find, fix, and verify the bugs using the go command. Special thanks to Beth Brown for her work on the fuzzing tutorial! Go 1.18 Beta 1 was released last month, which you can get by visiting the -[downloads page](https://go.dev/dl/#go1.18beta1). +[downloads page](/dl/#go1.18beta1). See the full [draft release notes for Go 1.18](https://tip.golang.org/doc/go1.18) for more details about what to expect in the release. As always, if you notice any problems, please [file an -issue](https://go.dev/issue/new). +issue](/issue/new). We hope you enjoy the tutorials, and we look forward to everything to come in -2022! \ No newline at end of file +2022! diff --git a/_content/doc/fuzz/index.md b/_content/doc/fuzz/index.md index 0c030b73..d01a4e3b 100644 --- a/_content/doc/fuzz/index.md +++ b/_content/doc/fuzz/index.md @@ -220,7 +220,7 @@ $ file2fuzz - **Tutorial**: - For an introductory tutorial of fuzzing with Go, please see [the blog - post](https://go.dev/blog/fuzz-beta). + post](/blog/fuzz-beta). - More to come soon! - **Documentation**: - The [`testing`](https://pkg.go.dev//testing#hdr-Fuzzing) package docs diff --git a/_content/doc/tutorial/fuzz.md b/_content/doc/tutorial/fuzz.md index 3309ab4d..40575f90 100644 --- a/_content/doc/tutorial/fuzz.md +++ b/_content/doc/tutorial/fuzz.md @@ -458,7 +458,7 @@ However, characters such as 泃 can require several bytes. Thus, reversing the string byte-by-byte will invalidate multi-byte characters. **Note:** If you’re curious about how Go deals with strings, read the blog post -[Strings, bytes, runes and characters in Go](https://go.dev/blog/strings) for a +[Strings, bytes, runes and characters in Go](/blog/strings) for a deeper understanding. With a better understanding of the bug, correct the error in the `Reverse` @@ -537,7 +537,7 @@ would be a great approach. In this tutorial, we will log useful debugging info in the `Reverse` function. Look closely at the reversed string to spot the error. In Go, [a string is a -read only slice of bytes](https://go.dev/blog/strings), and can contain bytes +read only slice of bytes](/blog/strings), and can contain bytes that aren’t valid UTF-8. The original string is a byte slice with one byte, `'\x91'`. When the input string is set to rune[], Go encodes the byte slice to UTF-8, and replaces the byte with the UTF-8 character �. When we compare the diff --git a/_content/doc/tutorial/generics.md b/_content/doc/tutorial/generics.md index be8bc8db..06251f13 100644 --- a/_content/doc/tutorial/generics.md +++ b/_content/doc/tutorial/generics.md @@ -22,7 +22,7 @@ You'll progress through the following sections: **Note:** For other tutorials, see [Tutorials](/doc/tutorial/index.html). **Note:** If you prefer, you can use -[the Go playground in “Go dev branch” mode](https://go.dev/play/?v=gotip) +[the Go playground in “Go dev branch” mode](/play/?v=gotip) to edit and run your program instead. ## Prerequisites @@ -484,7 +484,7 @@ Suggested next topics: You can run this program in the -[Go playground](https://go.dev/play/p/apNmfVwogK0?v=gotip). On the +[Go playground](/play/p/apNmfVwogK0?v=gotip). On the playground simply click the **Run** button. ``` diff --git a/_content/tour/concurrency.article b/_content/tour/concurrency.article index 83efbbe2..454768d7 100644 --- a/_content/tour/concurrency.article +++ b/_content/tour/concurrency.article @@ -186,17 +186,17 @@ If you need help with the standard library, see the [[/pkg/][package reference]] To further explore Go's concurrency model, watch [[https://www.youtube.com/watch?v=f6kdp27TYZs][Go Concurrency Patterns]] -([[https://go.dev/talks/2012/concurrency.slide][slides]]) +([[/talks/2012/concurrency.slide][slides]]) and [[https://www.youtube.com/watch?v=QDDwwePbDtw][Advanced Go Concurrency Patterns]] -([[https://go.dev/talks/2013/advconc.slide][slides]]) +([[/talks/2013/advconc.slide][slides]]) and read the [[/doc/codewalk/sharemem/][Share Memory by Communicating]] codewalk. To get started writing web applications, watch [[https://vimeo.com/53221558][A simple programming environment]] -([[https://go.dev/talks/2012/simple.slide][slides]]) +([[/talks/2012/simple.slide][slides]]) and read the [[/doc/articles/wiki/][Writing Web Applications]] tutorial.