all: format code according to Go 1.19 rules

Go 1.19 started reformatting code in a way that makes it more obvious
how it will be rendered on pkg.go.dev. It gets it almost right, but not
entirely. Therefore, I had to modify some of the comments so that they
are formatted correctly.
This commit is contained in:
Ayke van Laethem
2022-08-03 16:24:47 +02:00
committed by Ayke
parent f936125658
commit c7a23183e8
114 changed files with 509 additions and 381 deletions
+3
View File
@@ -18,6 +18,7 @@ type stringIterator struct {
}
// Return true iff the strings match.
//
//go:nobounds
func stringEqual(x, y string) bool {
if len(x) != len(y) {
@@ -32,6 +33,7 @@ func stringEqual(x, y string) bool {
}
// Return true iff x < y.
//
//go:nobounds
func stringLess(x, y string) bool {
l := len(x)
@@ -181,6 +183,7 @@ func encodeUTF8(x rune) ([4]byte, uintptr) {
}
// Decode a single UTF-8 character from a string.
//
//go:nobounds
func decodeUTF8(s string, index uintptr) (rune, uintptr) {
remaining := uintptr(len(s)) - index // must be >= 1 before calling this function