aboutsummaryrefslogtreecommitdiff
path: root/doc/go_spec.html
diff options
context:
space:
mode:
authorRob Pike <r@golang.org>2020-01-13 16:03:12 +1100
committerRob Pike <r@golang.org>2020-01-14 22:24:11 +0000
commitcae9a9fd65cae6cbde0aacfea8f70e952e89f33e (patch)
treeaa9d292ce82cb009d3d860b3f604262c62c65012 /doc/go_spec.html
parentcfe3cd903f018dec3cb5997d53b1744df4e53909 (diff)
downloadgo-cae9a9fd65cae6cbde0aacfea8f70e952e89f33e.tar.gz
go-cae9a9fd65cae6cbde0aacfea8f70e952e89f33e.zip
doc: fix up some HTML issues in go_spec.html
The HTML linter 'tidy' reports: go_spec.html:2556: Warning: unescaped & which should be written as &amp; go_spec.html:3293: Warning: unescaped & or unknown entity "&s1" go_spec.html:3293: Warning: unescaped & or unknown entity "&a" go_spec.html:3294: Warning: unescaped & or unknown entity "&s2" go_spec.html:3294: Warning: unescaped & or unknown entity "&a" go_spec.html:2045: Warning: trimming empty <p> go_spec.html:4526: Warning: trimming empty <ul> go_spec.html:4533: Warning: trimming empty <ul> go_spec.html:4539: Warning: trimming empty <ul> This CL fixes all but the <ul> ones, which I think should be fixed but are defended by a comment. Change-Id: I0ca88f5e80755024801877ab1298025ecf8f10c5 Reviewed-on: https://go-review.googlesource.com/c/go/+/214457 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com>
Diffstat (limited to 'doc/go_spec.html')
-rw-r--r--doc/go_spec.html8
1 files changed, 4 insertions, 4 deletions
diff --git a/doc/go_spec.html b/doc/go_spec.html
index 953b2d9e68..06c1edf7a6 100644
--- a/doc/go_spec.html
+++ b/doc/go_spec.html
@@ -2042,7 +2042,7 @@ of the last non-empty expression list.
<p>
A type declaration binds an identifier, the <i>type name</i>, to a <a href="#Types">type</a>.
Type declarations come in two forms: alias declarations and type definitions.
-<p>
+</p>
<pre class="ebnf">
TypeDecl = "type" ( TypeSpec | "(" { TypeSpec ";" } ")" ) .
@@ -2553,7 +2553,7 @@ does not have the same effect as allocating a new slice or map value with
</p>
<pre>
-p1 := &[]int{} // p1 points to an initialized, empty slice with value []int{} and length 0
+p1 := &amp;[]int{} // p1 points to an initialized, empty slice with value []int{} and length 0
p2 := new([]int) // p2 points to an uninitialized slice with value nil and length 0
</pre>
@@ -3290,8 +3290,8 @@ array with the operand.
<pre>
var a [10]int
-s1 := a[3:7] // underlying array of s1 is array a; &s1[2] == &a[5]
-s2 := s1[1:4] // underlying array of s2 is underlying array of s1 which is array a; &s2[1] == &a[5]
+s1 := a[3:7] // underlying array of s1 is array a; &amp;s1[2] == &amp;a[5]
+s2 := s1[1:4] // underlying array of s2 is underlying array of s1 which is array a; &amp;s2[1] == &amp;a[5]
s2[1] = 42 // s2[1] == s1[2] == a[5] == 42; they all refer to the same underlying array element
</pre>