From 30dadde3188b39150d373bac513a97df9d816a5b Mon Sep 17 00:00:00 2001 From: Oleksandr Redko Date: Mon, 6 Feb 2023 17:33:17 +0000 Subject: [PATCH] all: correct comment typos Change-Id: I1e31e93937e960fc7fcc4672208dae067e1f33e7 GitHub-Last-Rev: 9cdbf6ffdf7640755b32c9f965e6b7321bea5eb3 GitHub-Pull-Request: golang/text#42 Reviewed-on: https://go-review.googlesource.com/c/text/+/465655 Reviewed-by: Ian Lance Taylor Auto-Submit: Ian Lance Taylor Reviewed-by: David Chase Run-TryBot: Ian Lance Taylor TryBot-Result: Gopher Robot --- collate/build/builder.go | 2 +- collate/build/order.go | 2 +- collate/build/order_test.go | 2 +- collate/tools/colcmp/col.go | 2 +- encoding/ianaindex/ianaindex_test.go | 4 ++-- encoding/internal/internal.go | 2 +- internal/export/idna/idna9.0.0.go | 2 +- internal/number/decimal.go | 2 +- language/match_test.go | 2 +- message/pipeline/pipeline.go | 2 +- number/option.go | 2 +- secure/precis/class_test.go | 2 +- unicode/cldr/decode.go | 2 +- unicode/norm/forminfo.go | 2 +- 14 files changed, 15 insertions(+), 15 deletions(-) diff --git a/collate/build/builder.go b/collate/build/builder.go index 3efb7387d..e37b4106e 100644 --- a/collate/build/builder.go +++ b/collate/build/builder.go @@ -240,7 +240,7 @@ func (t *Tailoring) SetAnchorBefore(anchor string) error { // t.SetAnchor("u") // t.Insert(colltab.Secondary, "ΓΌ", "e") // -// Order "q" afer "ab" at the secondary level and "Q" after "q" +// Order "q" after "ab" at the secondary level and "Q" after "q" // at the tertiary level: // // t.SetAnchor("ab") diff --git a/collate/build/order.go b/collate/build/order.go index 23fcf67b4..21d4bee76 100644 --- a/collate/build/order.go +++ b/collate/build/order.go @@ -308,7 +308,7 @@ func makeRootOrdering() ordering { return o } -// patchForInsert eleminates entries from the list with more than one collation element. +// patchForInsert eliminates entries from the list with more than one collation element. // The next and prev fields of the eliminated entries still point to appropriate // values in the newly created list. // It requires that sort has been called. diff --git a/collate/build/order_test.go b/collate/build/order_test.go index 0e174bfbd..38c499ead 100644 --- a/collate/build/order_test.go +++ b/collate/build/order_test.go @@ -92,7 +92,7 @@ func TestRemove(t *testing.T) { // nextPerm generates the next permutation of the array. The starting // permutation is assumed to be a list of integers sorted in increasing order. -// It returns false if there are no more permuations left. +// It returns false if there are no more permutations left. func nextPerm(a []int) bool { i := len(a) - 2 for ; i >= 0; i-- { diff --git a/collate/tools/colcmp/col.go b/collate/tools/colcmp/col.go index dc22d2eef..e972c5042 100644 --- a/collate/tools/colcmp/col.go +++ b/collate/tools/colcmp/col.go @@ -73,7 +73,7 @@ func getCollator(name, locale string) Collator { return nil } -// goCollator is an implemention of Collator using go's own collator. +// goCollator is an implementation of Collator using go's own collator. type goCollator struct { c *collate.Collator buf collate.Buffer diff --git a/encoding/ianaindex/ianaindex_test.go b/encoding/ianaindex/ianaindex_test.go index d545fcf23..5bcc449c2 100644 --- a/encoding/ianaindex/ianaindex_test.go +++ b/encoding/ianaindex/ianaindex_test.go @@ -49,9 +49,9 @@ func TestNotSupported(t *testing.T) { } } - // Many encodings in the IANA index will likely not be suppored by the + // Many encodings in the IANA index will likely not be supported by the // Go encodings. That is fine. - // TODO: consider wheter we should add this test. + // TODO: consider whether we should add this test. // for code, mib := range ianaToMIB { // t.Run(fmt.Sprint("IANA:", mib), func(t *testing.T) { // if !mibs[mib] { diff --git a/encoding/internal/internal.go b/encoding/internal/internal.go index 75a5fd165..413e6fc6d 100644 --- a/encoding/internal/internal.go +++ b/encoding/internal/internal.go @@ -64,7 +64,7 @@ func (e FuncEncoding) NewEncoder() *encoding.Encoder { // byte. type RepertoireError byte -// Error implements the error interrface. +// Error implements the error interface. func (r RepertoireError) Error() string { return "encoding: rune not supported by encoding." } diff --git a/internal/export/idna/idna9.0.0.go b/internal/export/idna/idna9.0.0.go index 4979fdc17..96424a0b5 100644 --- a/internal/export/idna/idna9.0.0.go +++ b/internal/export/idna/idna9.0.0.go @@ -121,7 +121,7 @@ func CheckJoiners(enable bool) Option { } } -// StrictDomainName limits the set of permissable ASCII characters to those +// StrictDomainName limits the set of permissible ASCII characters to those // allowed in domain names as defined in RFC 1034 (A-Z, a-z, 0-9 and the // hyphen). This is set by default for MapForLookup and ValidateForRegistration, // but is only useful if ValidateLabels is set. diff --git a/internal/number/decimal.go b/internal/number/decimal.go index 37e0c4b98..e128cf343 100644 --- a/internal/number/decimal.go +++ b/internal/number/decimal.go @@ -419,7 +419,7 @@ func (d *Decimal) ConvertFloat(r RoundingContext, x float64, size int) { } } else { // TODO: At this point strconv's rounding is imprecise to the point that - // it is not useable for this purpose. + // it is not usable for this purpose. // See https://github.com/golang/go/issues/21714 // If rounding is requested, we ask for a large number of digits and // round from there to simulate rounding only once. diff --git a/language/match_test.go b/language/match_test.go index 313580b60..17afc327a 100644 --- a/language/match_test.go +++ b/language/match_test.go @@ -99,7 +99,7 @@ func makeTagList(s string) (tags []Tag) { func TestMatchStrings(t *testing.T) { testCases := []struct { supported string - desired string // strings separted by | + desired string // strings separated by | tag string index int }{{ diff --git a/message/pipeline/pipeline.go b/message/pipeline/pipeline.go index cafd6f29b..34f15f8ab 100644 --- a/message/pipeline/pipeline.go +++ b/message/pipeline/pipeline.go @@ -90,7 +90,7 @@ type Config struct { // file. If not specified it is relative to the current directory. GenPackage string - // DeclareVar defines a variable to which to assing the generated Catalog. + // DeclareVar defines a variable to which to assign the generated Catalog. DeclareVar string // SetDefault determines whether to assign the generated Catalog to diff --git a/number/option.go b/number/option.go index de96f8eaa..eab1e3b50 100644 --- a/number/option.go +++ b/number/option.go @@ -172,6 +172,6 @@ func Pad(r rune) Option { // - FormatPosition (using type aliasing?) // - Multiplier: find a better way to represent and figure out what to do // with clashes with percent/permille. -// - NumberingSystem(nu string): not accessable in number.Info now. Also, should +// - NumberingSystem(nu string): not accessible in number.Info now. Also, should // this be keyed by language or generic? // - SymbolOverrides(symbols map[string]map[number.SymbolType]string) Option diff --git a/secure/precis/class_test.go b/secure/precis/class_test.go index fbaf6457f..aa66c550b 100644 --- a/secure/precis/class_test.go +++ b/secure/precis/class_test.go @@ -13,7 +13,7 @@ import ( // Compile-time regression test to ensure that Class is a Set var _ runes.Set = (*class)(nil) -// Ensure that certain characters are (or are not) in the identifer class. +// Ensure that certain characters are (or are not) in the identifier class. func TestClassContains(t *testing.T) { tests := []struct { name string diff --git a/unicode/cldr/decode.go b/unicode/cldr/decode.go index 1abcb9e1f..7a8fb5ae7 100644 --- a/unicode/cldr/decode.go +++ b/unicode/cldr/decode.go @@ -32,7 +32,7 @@ func (d *Decoder) SetSectionFilter(filter ...string) { // TODO: automatically set dir filter } -// SetDirFilter limits the loading of LDML XML files of the specied directories. +// SetDirFilter limits the loading of LDML XML files of the specified directories. // Note that sections may be split across directories differently for different CLDR versions. // For more robust code, use SetSectionFilter. func (d *Decoder) SetDirFilter(dir ...string) { diff --git a/unicode/norm/forminfo.go b/unicode/norm/forminfo.go index d69ccb4f9..487335d14 100644 --- a/unicode/norm/forminfo.go +++ b/unicode/norm/forminfo.go @@ -13,7 +13,7 @@ import "encoding/binary" // a rune to a uint16. The values take two forms. For v >= 0x8000: // bits // 15: 1 (inverse of NFD_QC bit of qcInfo) -// 13..7: qcInfo (see below). isYesD is always true (no decompostion). +// 13..7: qcInfo (see below). isYesD is always true (no decomposition). // 6..0: ccc (compressed CCC value). // For v < 0x8000, the respective rune has a decomposition and v is an index // into a byte array of UTF-8 decomposition sequences and additional info and