Go language-spec needs many updates
-
package
andimport
should be externals, like in Java, not keywords. - The escaped character section contains two errors and two omissions. Go's octal escape requires exactly three octal digits after the backslash, while its hex escape requires exactly two hex digits after the
\x
. Further, it omits Go's Unicode escape sequences, consisting of either\u
followed by four hex digits or\U
followed by eight hex digits. https://golang.org/ref/spec#Rune_literals - The
printf
verbs are missing%O
,%F
, and thefmt
package's ability to 1-index arguments within verbs, e.g.fmt.Sprintf("%[3]*.[2]*[1]f", 12.0, 2, 6)
is equivalent tofmt.Sprintf("%6.2f", 12.0)
and yields12.00
. (https://golang.org/pkg/fmt/) - Go 1.13 introduces several new integer syntaxes:
0b
for binary literals,0o
or0O
for octal literals, hexadecimal floating point literals like 0x1.0p-1021, and an underscore may inserted between any two digits or after0b/0o/0x
. Additionally, imaginary literals may now consist of any valid integer or floating-point literal followed byi
. https://golang.org/doc/go1.13, https://golang.org/ref/spec#Integer_literals, https://golang.org/ref/spec#Floating-point_literals, https://golang.org/ref/spec#Imaginary_literals