all: fix some comments
Change-Id: Idc053f5d3a787746c0205dbda5cc34b7d2be4655
Reviewed-on: https://go-review.googlesource.com/c/text/+/464255
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
Auto-Submit: Ian Lance Taylor <iant@google.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Run-TryBot: Ian Lance Taylor <iant@google.com>
diff --git a/internal/cldrtree/option.go b/internal/cldrtree/option.go
index f91e250..33b6103 100644
--- a/internal/cldrtree/option.go
+++ b/internal/cldrtree/option.go
@@ -29,7 +29,7 @@
}
}
-// aliasOpt sets an alias from the given node, if the node defines one.
+// setAlias sets an alias from the given node, if the node defines one.
func (o *options) setAlias(n Element) {
if n != nil && !reflect.ValueOf(n).IsNil() {
o.alias = n.GetCommon()
diff --git a/internal/language/compact/language.go b/internal/language/compact/language.go
index 83816a7..8c1b666 100644
--- a/internal/language/compact/language.go
+++ b/internal/language/compact/language.go
@@ -118,7 +118,7 @@
return Tag{language: lang, locale: lang}
}
-// returns token t and the rest of the string.
+// nextToken returns token t and the rest of the string.
func nextToken(s string) (t, tail string) {
p := strings.Index(s[1:], "-")
if p == -1 {
diff --git a/internal/language/gen.go b/internal/language/gen.go
index 520f159..f0ef4b2 100644
--- a/internal/language/gen.go
+++ b/internal/language/gen.go
@@ -1080,7 +1080,7 @@
return -1
}
-// writeVariants generates per-variant information and creates a map from variant
+// writeVariant generates per-variant information and creates a map from variant
// name to index value. We assign index values such that sorting multiple
// variants by index value will result in the correct order.
// There are two types of variants: specialized and general. Specialized variants
diff --git a/internal/language/language.go b/internal/language/language.go
index 6105bc7..09d41c7 100644
--- a/internal/language/language.go
+++ b/internal/language/language.go
@@ -409,7 +409,7 @@
return t, nil
}
-// findKeyAndType returns the start and end position for the type corresponding
+// findTypeForKey returns the start and end position for the type corresponding
// to key or the point at which to insert the key-value pair if the type
// wasn't found. The hasExt return value reports whether an -u extension was present.
// Note: the extensions are typically very small and are likely to contain
diff --git a/language/display/maketables.go b/language/display/maketables.go
index a6cbcc6..25674bb 100644
--- a/language/display/maketables.go
+++ b/language/display/maketables.go
@@ -528,7 +528,7 @@
}
}
-// WriteTable writes an entry for a single Namer.
+// writeTable writes an entry for a single Namer.
func (g *group) writeTable(w *gen.CodeWriter, name string) {
start := w.Size
writeKeys(w, name, g.toTags)
diff --git a/language/language.go b/language/language.go
index 289b3a3..4d9c661 100644
--- a/language/language.go
+++ b/language/language.go
@@ -344,7 +344,7 @@
return Tag(compact.Tag(t).Parent())
}
-// returns token t and the rest of the string.
+// nextToken returns token t and the rest of the string.
func nextToken(s string) (t, tail string) {
p := strings.Index(s[1:], "-")
if p == -1 {