Skip to content

Commit

Permalink
all: fix some comments
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
cuishuang authored and gopherbot committed Jan 31, 2023
1 parent ec5565b commit 71a9c9a
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion internal/cldrtree/option.go
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
2 changes: 1 addition & 1 deletion internal/language/compact/language.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion internal/language/gen.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion internal/language/language.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion language/display/maketables.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion language/language.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 71a9c9a

Please sign in to comment.