]> Cypherpunks repositories - gostls13.git/commitdiff
all: fix comment typos
authorDan Kortschak <dan@kortschak.io>
Sat, 5 Nov 2022 05:44:08 +0000 (16:14 +1030)
committerGopher Robot <gobot@golang.org>
Sat, 5 Nov 2022 21:02:45 +0000 (21:02 +0000)
Change-Id: Ic16824482142d4de4d0b949459e36505ee944ff7
Reviewed-on: https://go-review.googlesource.com/c/go/+/448175
Reviewed-by: Robert Griesemer <gri@google.com>
Run-TryBot: Dan Kortschak <dan@kortschak.io>
Auto-Submit: Robert Griesemer <gri@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Auto-Submit: Dan Kortschak <dan@kortschak.io>
Auto-Submit: Ian Lance Taylor <iant@google.com>
Run-TryBot: Ian Lance Taylor <iant@google.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
src/crypto/internal/edwards25519/tables.go
src/crypto/rsa/pkcs1v15.go
src/crypto/x509/sec1.go
src/debug/dwarf/entry.go
src/encoding/xml/read.go
src/go/internal/gcimporter/iimport.go
src/go/types/infer.go
src/go/types/validtype.go
src/internal/coverage/encodecounter/encode.go
src/internal/fuzz/queue.go

index 5ca40f7bfa7a87f1b54ff65ced24d56db7142e6a..83234bbc0faa884ab477e45a5dcc030abff8ec1f 100644 (file)
@@ -38,7 +38,7 @@ func (v *projLookupTable) FromP3(q *Point) {
        tmpP3 := Point{}
        tmpP1xP1 := projP1xP1{}
        for i := 0; i < 7; i++ {
-               // Compute (i+1)*Q as Q + i*Q and convert to a ProjCached
+               // Compute (i+1)*Q as Q + i*Q and convert to a projCached
                // This is needlessly complicated because the API has explicit
                // receivers instead of creating stack objects and relying on RVO
                v.points[i+1].FromP3(tmpP3.fromP1xP1(tmpP1xP1.Add(q, &v.points[i])))
@@ -53,7 +53,7 @@ func (v *affineLookupTable) FromP3(q *Point) {
        tmpP3 := Point{}
        tmpP1xP1 := projP1xP1{}
        for i := 0; i < 7; i++ {
-               // Compute (i+1)*Q as Q + i*Q and convert to AffineCached
+               // Compute (i+1)*Q as Q + i*Q and convert to affineCached
                v.points[i+1].FromP3(tmpP3.fromP1xP1(tmpP1xP1.AddAffine(q, &v.points[i])))
        }
 }
index ab19229a6c282279ca2bf68fea4dc8b9b2dcf332..ea5a878620b9104a7a3b4350097fbe884125c193 100644 (file)
@@ -16,7 +16,7 @@ import (
 
 // This file implements encryption and decryption using PKCS #1 v1.5 padding.
 
-// PKCS1v15DecrypterOpts is for passing options to PKCS #1 v1.5 decryption using
+// PKCS1v15DecryptOptions is for passing options to PKCS #1 v1.5 decryption using
 // the crypto.Decrypter interface.
 type PKCS1v15DecryptOptions struct {
        // SessionKeyLen is the length of the session key that is being
index ff48e0cc9e51d1b4f24e807988481e245e9cba06..c01c6b0e55def97595124400e6ace608a8793534 100644 (file)
@@ -51,7 +51,7 @@ func MarshalECPrivateKey(key *ecdsa.PrivateKey) ([]byte, error) {
        return marshalECPrivateKeyWithOID(key, oid)
 }
 
-// marshalECPrivateKey marshals an EC private key into ASN.1, DER format and
+// marshalECPrivateKeyWithOID marshals an EC private key into ASN.1, DER format and
 // sets the curve ID to the given OID, or omits it if OID is nil.
 func marshalECPrivateKeyWithOID(key *ecdsa.PrivateKey, oid asn1.ObjectIdentifier) ([]byte, error) {
        if !key.Curve.IsOnCurve(key.X, key.Y) {
index 2f804f88ee029810236ee914840899dcb5e9a92a..5bb4297b4896a4972bee6f8bcdb88b6b89352d32 100644 (file)
@@ -34,7 +34,7 @@ type afield struct {
 // a map from entry format ids to their descriptions
 type abbrevTable map[uint32]abbrev
 
-// ParseAbbrev returns the abbreviation table that starts at byte off
+// parseAbbrev returns the abbreviation table that starts at byte off
 // in the .debug_abbrev section.
 func (d *Data) parseAbbrev(off uint64, vers int) (abbrevTable, error) {
        if m, ok := d.abbrevCache[off]; ok {
index c2f495581acbe9fdd929d6e49dae412f53b48ccb..43be08eeefb3b0648f982b40529ef706c5721ade 100644 (file)
@@ -537,7 +537,7 @@ Loop:
                        consumed := false
                        if sv.IsValid() {
                                // unmarshalPath can call unmarshal, so we need to pass the depth through so that
-                               // we can continue to enforce the maximum recusion limit.
+                               // we can continue to enforce the maximum recursion limit.
                                consumed, err = d.unmarshalPath(tinfo, sv, nil, &t, depth)
                                if err != nil {
                                        return err
index cc0818dd9a9e408bb4da889ddeb46a1a14e22641..9e3c945b5674c3b4069cc12d62bf2f73b91f1d2a 100644 (file)
@@ -348,7 +348,7 @@ func (r *importReader) obj(name string) {
 
        case 'T', 'U':
                // Types can be recursive. We need to setup a stub
-               // declaration before recursing.
+               // declaration before recurring.
                obj := types.NewTypeName(pos, r.currPkg, name, nil)
                named := types.NewNamed(obj, nil, nil)
                // Declare obj before calling r.tparamList, so the new type name is recognized
index 7ac452d15292623f2aeda9c027bb06ebbad27986..5a762a78ab04fe4a3c7e5123025500c3aa11fc57 100644 (file)
@@ -579,7 +579,7 @@ func (check *Checker) inferB(posn positioner, tparams []*TypeParam, targs []Type
        }
 
        // The data structure of each (provided or inferred) type represents a graph, where
-       // each node corresponds to a type and each (directed) vertice points to a component
+       // each node corresponds to a type and each (directed) vertex points to a component
        // type. The substitution process described above repeatedly replaces type parameter
        // nodes in these graphs with the graphs of the types the type parameters stand for,
        // which creates a new (possibly bigger) graph for each type.
@@ -592,14 +592,14 @@ func (check *Checker) inferB(posn positioner, tparams []*TypeParam, targs []Type
        // Generally, cycles may occur across multiple type parameters and inferred types
        // (for instance, consider [P interface{ *Q }, Q interface{ func(P) }]).
        // We eliminate cycles by walking the graphs for all type parameters. If a cycle
-       // through a type parameter is detected, cycleFinder nils out the respectice type
+       // through a type parameter is detected, cycleFinder nils out the respective type
        // which kills the cycle; this also means that the respective type could not be
        // inferred.
        //
        // TODO(gri) If useful, we could report the respective cycle as an error. We don't
        //           do this now because type inference will fail anyway, and furthermore,
        //           constraints with cycles of this kind cannot currently be satisfied by
-       //           any user-suplied type. But should that change, reporting an error
+       //           any user-supplied type. But should that change, reporting an error
        //           would be wrong.
        w := cycleFinder{tparams, types, make(map[Type]bool)}
        for _, t := range tparams {
index 34c9533a05af0e07a34362b53e41ec47d6538245..467a7fe5f5c3be2071a624001d71d682f888b273 100644 (file)
@@ -177,7 +177,7 @@ func makeObjList(tlist []*Named) []Object {
 //         nest = A[A[string]]->B[P]
 //         path = A[A[string]]->B[P]
 //
-// Eventutally we reach the type parameter P of type B (P₂):
+// Eventually we reach the type parameter P of type B (P₂):
 //
 //   P₂
 //         nest = A[A[string]]->B[P]
index 40e24418d4ae48408e0d5deb83c07be66f13fd08..8db4f514e8eae98ef199fb899925664dc791255f 100644 (file)
@@ -18,7 +18,7 @@ import (
 )
 
 // This package contains APIs and helpers for encoding initial portions
-// of the counter data files emitted at runtime when coverage instrumention
+// of the counter data files emitted at runtime when coverage instrumentation
 // is enabled.  Counter data files may contain multiple segments; the file
 // header and first segment are written via the "Write" method below, and
 // additional segments can then be added using "AddSegment".
index 42a8379541f881d2f8141abaf54223965b85419e..195d6eb7b60e34428d8e8dc37522d1cf6f4a4bc3 100644 (file)
@@ -9,7 +9,7 @@ package fuzz
 // For now, this is a simple ring buffer
 // (https://en.wikipedia.org/wiki/Circular_buffer).
 //
-// TODO(golang.org/issue/46224): use a priotization algorithm based on input
+// TODO(golang.org/issue/46224): use a prioritization algorithm based on input
 // size, previous duration, coverage, and any other metrics that seem useful.
 type queue struct {
        // elems holds a ring buffer.