diff --git a/_content/doc/articles/wiki/index.html b/_content/doc/articles/wiki/index.html
index 107fba4a9d..b88a820ad3 100644
--- a/_content/doc/articles/wiki/index.html
+++ b/_content/doc/articles/wiki/index.html
@@ -54,8 +54,8 @@
Getting Started
package main
import (
- "fmt"
- "os"
+ "fmt"
+ "os"
)
@@ -255,10 +255,10 @@ Using net/http
to serve wiki pages
import (
- "fmt"
- "os"
- "log"
- "net/http"
+ "fmt"
+ "os"
+ "log"
+ "net/http"
)
@@ -371,9 +371,9 @@ The html/template
package
import (
- "html/template"
- "os"
- "net/http"
+ "html/template"
+ "os"
+ "net/http"
)
@@ -649,10 +649,10 @@ Introducing Function Literals and Closures
func makeHandler(fn func (http.ResponseWriter, *http.Request, string)) http.HandlerFunc {
- return func(w http.ResponseWriter, r *http.Request) {
- // Here we will extract the page title from the Request,
- // and call the provided handler 'fn'
- }
+ return func(w http.ResponseWriter, r *http.Request) {
+ // Here we will extract the page title from the Request,
+ // and call the provided handler 'fn'
+ }
}
diff --git a/_content/doc/code.html b/_content/doc/code.html
index 35b7c194bd..1219cf334a 100644
--- a/_content/doc/code.html
+++ b/_content/doc/code.html
@@ -99,7 +99,7 @@ Your first program
import "fmt"
func main() {
- fmt.Println("Hello, world.")
+ fmt.Println("Hello, world.")
}
@@ -230,11 +230,11 @@ Importing packages from your module
// ReverseRunes returns its argument string reversed rune-wise left to right.
func ReverseRunes(s string) string {
- r := []rune(s)
- for i, j := 0, len(r)-1; i < len(r)/2; i, j = i+1, j-1 {
- r[i], r[j] = r[j], r[i]
- }
- return string(r)
+ r := []rune(s)
+ for i, j := 0, len(r)-1; i < len(r)/2; i, j = i+1, j-1 {
+ r[i], r[j] = r[j], r[i]
+ }
+ return string(r)
}
@@ -270,13 +270,13 @@ Importing packages from your module
package main
import (
- "fmt"
+ "fmt"
- "example/user/hello/morestrings"
+ "example/user/hello/morestrings"
)
func main() {
- fmt.Println(morestrings.ReverseRunes("!oG ,olleH"))
+ fmt.Println(morestrings.ReverseRunes("!oG ,olleH"))
}
@@ -310,15 +310,15 @@ Importing packages from remote modules
package main
import (
- "fmt"
+ "fmt"
- "example/user/hello/morestrings"
- "github.com/google/go-cmp/cmp"
+ "example/user/hello/morestrings"
+ "github.com/google/go-cmp/cmp"
)
func main() {
- fmt.Println(morestrings.ReverseRunes("!oG ,olleH"))
- fmt.Println(cmp.Diff("Hello World", "Hello Go"))
+ fmt.Println(morestrings.ReverseRunes("!oG ,olleH"))
+ fmt.Println(cmp.Diff("Hello World", "Hello Go"))
}
@@ -337,8 +337,8 @@ Importing packages from remote modules
$ hello
Hello, Go!
string(
-- "Hello World",
-+ "Hello Go",
+- "Hello World",
++ "Hello Go",
)
$ cat go.mod
module example/user/hello
@@ -392,19 +392,19 @@ Testing
import "testing"
func TestReverseRunes(t *testing.T) {
- cases := []struct {
- in, want string
- }{
- {"Hello, world", "dlrow ,olleH"},
- {"Hello, 世界", "界世 ,olleH"},
- {"", ""},
- }
- for _, c := range cases {
- got := ReverseRunes(c.in)
- if got != c.want {
- t.Errorf("ReverseRunes(%q) == %q, want %q", c.in, got, c.want)
- }
- }
+ cases := []struct {
+ in, want string
+ }{
+ {"Hello, world", "dlrow ,olleH"},
+ {"Hello, 世界", "界世 ,olleH"},
+ {"", ""},
+ }
+ for _, c := range cases {
+ got := ReverseRunes(c.in)
+ if got != c.want {
+ t.Errorf("ReverseRunes(%q) == %q, want %q", c.in, got, c.want)
+ }
+ }
}
diff --git a/_content/doc/effective_go.html b/_content/doc/effective_go.html
index 6104d3a191..632a808747 100644
--- a/_content/doc/effective_go.html
+++ b/_content/doc/effective_go.html
@@ -815,27 +815,27 @@ Switch
Loop:
- for n := 0; n < len(src); n += size {
- switch {
- case src[n] < sizeOne:
- if validateOnly {
- break
- }
- size = 1
- update(src[n])
-
- case src[n] < sizeTwo:
- if n+1 >= len(src) {
- err = errShortInput
- break Loop
- }
- if validateOnly {
- break
- }
- size = 2
- update(src[n] + src[n+1]<<shift)
- }
- }
+ for n := 0; n < len(src); n += size {
+ switch {
+ case src[n] < sizeOne:
+ if validateOnly {
+ break
+ }
+ size = 1
+ update(src[n])
+
+ case src[n] < sizeTwo:
+ if n+1 >= len(src) {
+ err = errShortInput
+ break Loop
+ }
+ if validateOnly {
+ break
+ }
+ size = 2
+ update(src[n] + src[n+1]<<shift)
+ }
+ }
@@ -1490,9 +1490,9 @@
Two-dimensional slices
text := LinesOfText{
- []byte("Now is the time"),
- []byte("for all good gophers"),
- []byte("to bring some fun to the party."),
+ []byte("Now is the time"),
+ []byte("for all good gophers"),
+ []byte("to bring some fun to the party."),
}
@@ -1515,7 +1515,7 @@ Two-dimensional slices
picture := make([][]uint8, YSize) // One row per unit of y.
// Loop over the rows, allocating the slice for each row.
for i := range picture {
- picture[i] = make([]uint8, XSize)
+ picture[i] = make([]uint8, XSize)
}
@@ -1530,7 +1530,7 @@ Two-dimensional slices
pixels := make([]uint8, XSize*YSize) // Has type []uint8 even though picture is [][]uint8.
// Loop over the rows, slicing each row from the front of the remaining pixels slice.
for i := range picture {
- picture[i], pixels = pixels[:XSize], pixels[XSize:]
+ picture[i], pixels = pixels[:XSize], pixels[XSize:]
}
@@ -2520,7 +2520,7 @@ The blank identifier in multiple assignment
if _, err := os.Stat(path); os.IsNotExist(err) {
- fmt.Printf("%s does not exist\n", path)
+ fmt.Printf("%s does not exist\n", path)
}
diff --git a/_content/doc/faq.html b/_content/doc/faq.html
index 1a0d4c4a72..8239e51c8c 100644
--- a/_content/doc/faq.html
+++ b/_content/doc/faq.html
@@ -966,11 +966,11 @@
func returnsError() error {
- var p *MyError = nil
- if bad() {
- p = ErrBad
- }
- return p // Will always return a non-nil error.
+ var p *MyError = nil
+ if bad() {
+ p = ErrBad
+ }
+ return p // Will always return a non-nil error.
}
@@ -987,10 +987,10 @@
func returnsError() error {
- if bad() {
- return ErrBad
- }
- return nil
+ if bad() {
+ return ErrBad
+ }
+ return nil
}
@@ -1060,7 +1060,7 @@
type Copyable interface {
- Copy() interface{}
+ Copy() interface{}
}
@@ -2096,7 +2096,7 @@
type S[T any] struct { f T }
func (s S[string]) Add(t string) string {
- return s.f + t
+ return s.f + t
}
diff --git a/_content/ref/mod.md b/_content/ref/mod.md
index dd4ebc5a38..13db4012a0 100644
--- a/_content/ref/mod.md
+++ b/_content/ref/mod.md
@@ -788,8 +788,8 @@ publishes version `v1.0.0` accidentally. To prevent users from upgrading to
```
retract (
- v1.0.0 // Published accidentally.
- v1.0.1 // Contains retractions only.
+ v1.0.0 // Published accidentally.
+ v1.0.1 // Contains retractions only.
)
```
@@ -1941,33 +1941,33 @@ The editing flags may be repeated. The changes are applied in the order given.
```
type Module struct {
- Path string
- Version string
+ Path string
+ Version string
}
type GoMod struct {
- Module Module
- Go string
- Require []Require
- Exclude []Module
- Replace []Replace
+ Module Module
+ Go string
+ Require []Require
+ Exclude []Module
+ Replace []Replace
}
type Require struct {
- Path string
- Version string
- Indirect bool
+ Path string
+ Version string
+ Indirect bool
}
type Replace struct {
- Old Module
- New Module
+ Old Module
+ New Module
}
type Retract struct {
- Low string
- High string
- Rationale string
+ Low string
+ High string
+ Rationale string
}
```
@@ -2820,9 +2820,9 @@ module golang.org/x/mod
go 1.12
require (
- golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550
- golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e
- golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898
+ golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550
+ golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e
+ golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898
)
```
@@ -4563,4 +4563,4 @@ letter `v` followed by a semantic version. See the section on
**workspace:** A collection of modules on disk that are used as
the root modules when running [minimal version selection (MVS)](#minimal-version-selection).
-See the section on [Workspaces](#workspaces)
\ No newline at end of file
+See the section on [Workspaces](#workspaces)