summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcui fliter <imcusg@gmail.com>2023-01-31 10:28:49 +0800
committerGopher Robot <gobot@golang.org>2023-01-31 16:01:06 +0000
commit71a9c9afc4cd710b9412f7f99f0d8e35b10e488a (patch)
treefb083b43331eea4595d289b2c3d2ea1b12caf820
parentec5565b1b747ce5ca569aeefc09e737b479a12ac (diff)
downloadgolang-x-text-71a9c9afc4cd710b9412f7f99f0d8e35b10e488a.tar.gz
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>
-rw-r--r--internal/cldrtree/option.go2
-rw-r--r--internal/language/compact/language.go2
-rw-r--r--internal/language/gen.go2
-rw-r--r--internal/language/language.go2
-rw-r--r--language/display/maketables.go2
-rw-r--r--language/language.go2
6 files changed, 6 insertions, 6 deletions
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 @@ func (o *options) fill(opt []Option) {
}
}
-// 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 @@ func (t Tag) Parent() Tag {
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 @@ func find(list []string, s string) int {
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 @@ func (t Tag) SetTypeForKey(key, value string) (Tag, error) {
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 @@ func (h *header) writeSingle(w *gen.CodeWriter, name string) {
}
}
-// 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 @@ func (t Tag) Parent() Tag {
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 {