all: fix a few function names on comments

Change-Id: Ibdf787b7a62e8201393f2a4487cd8c67d8b0c91d
Reviewed-on: https://go-review.googlesource.com/c/text/+/441717
Run-TryBot: Ian Lance Taylor <iant@google.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Auto-Submit: Ian Lance Taylor <iant@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Joedian Reid <joedian@golang.org>
This commit is contained in:
cui fliter 2022-10-11 17:55:29 +08:00 коммит произвёл Gopher Robot
Родитель 434eadcdbc
Коммит 369c86ba11
3 изменённых файлов: 3 добавлений и 3 удалений

Просмотреть файл

@ -50,7 +50,7 @@ func (id Language) Canonicalize() (Language, AliasType) {
return normLang(id)
}
// mapLang returns the mapped langID of id according to mapping m.
// normLang returns the mapped langID of id according to mapping m.
func normLang(id Language) (Language, AliasType) {
k := sort.Search(len(AliasMap), func(i int) bool {
return AliasMap[i].From >= uint16(id)

Просмотреть файл

@ -33,7 +33,7 @@ func In(rt *unicode.RangeTable) Set {
return setFunc(func(r rune) bool { return unicode.Is(rt, r) })
}
// In creates a Set with a Contains method that returns true for all runes not
// NotIn creates a Set with a Contains method that returns true for all runes not
// in the given RangeTable.
func NotIn(rt *unicode.RangeTable) Set {
return setFunc(func(r rune) bool { return !unicode.Is(rt, r) })

Просмотреть файл

@ -229,7 +229,7 @@ func skipSpace(s string) string {
return strings.TrimLeftFunc(s, unicode.IsSpace)
}
// consumes returns whether the next byte is ch. If so, it gobbles it by
// consume returns whether the next byte is ch. If so, it gobbles it by
// updating s.
func consume(s *string, ch byte) (ok bool) {
if *s == "" || (*s)[0] != ch {