]> Cypherpunks repositories - gostls13.git/commitdiff
all: fix article typos
authorKunpei Sakai <namusyaka@gmail.com>
Fri, 15 Sep 2017 01:24:47 +0000 (10:24 +0900)
committerRob Pike <r@golang.org>
Fri, 15 Sep 2017 02:39:16 +0000 (02:39 +0000)
a -> an

Change-Id: I7362bdc199e83073a712be657f5d9ba16df3077e
Reviewed-on: https://go-review.googlesource.com/63850
Reviewed-by: Rob Pike <r@golang.org>
23 files changed:
src/archive/zip/reader.go
src/cmd/cgo/main.go
src/cmd/compile/internal/gc/walk.go
src/cmd/compile/internal/ssa/loopreschedchecks.go
src/cmd/internal/obj/arm64/obj7.go
src/cmd/link/internal/ld/dwarf.go
src/compress/gzip/gunzip.go
src/context/example_test.go
src/crypto/dsa/dsa.go
src/crypto/ecdsa/ecdsa.go
src/crypto/tls/key_agreement.go
src/encoding/asn1/asn1.go
src/encoding/asn1/marshal.go
src/image/color/color.go
src/net/http/server.go
src/os/sys_windows.go
src/reflect/value.go
src/regexp/exec.go
src/runtime/cgocall.go
src/runtime/mheap.go
src/strconv/extfloat.go
test/chan/sendstmt.go
test/fixedbugs/issue15747b.go

index f6c3ead3beabd20aca92de87c2b9ab2fba664556..615ae2fdcd724dbc4f1f70317b38cf548d214250 100644 (file)
@@ -94,7 +94,7 @@ func (z *Reader) init(r io.ReaderAt, size int64) error {
 
        // The count of files inside a zip is truncated to fit in a uint16.
        // Gloss over this by reading headers until we encounter
-       // a bad one, and then only report a ErrFormat or UnexpectedEOF if
+       // a bad one, and then only report an ErrFormat or UnexpectedEOF if
        // the file count modulo 65536 is incorrect.
        for {
                f := &File{zip: z, zipr: r, zipsize: size}
index 2820fc1bfbbc763dc4c0da045553226c360b50c9..f2a2d859aa3394adc091e02ad96cb6b672ea378b 100644 (file)
@@ -106,7 +106,7 @@ func (n *Name) IsConst() bool {
        return strings.HasSuffix(n.Kind, "const")
 }
 
-// A ExpFunc is an exported function, callable from C.
+// An ExpFunc is an exported function, callable from C.
 // Such functions are identified in the Go input file
 // by doc comments containing the line //export ExpName
 type ExpFunc struct {
index 157693f32109a02aa5b0d02fd4fa758399370ca9..327ca469c36a30b6ed005c36fbb44df964d04d1e 100644 (file)
@@ -1767,7 +1767,7 @@ func ascompatee1(l *Node, r *Node, init *Nodes) *Node {
 
 func ascompatee(op Op, nl, nr []*Node, init *Nodes) []*Node {
        // check assign expression list to
-       // a expression list. called in
+       // an expression list. called in
        //      expr-list = expr-list
 
        // ensure order of evaluation for function calls
@@ -1819,7 +1819,7 @@ func fncall(l *Node, rt *types.Type) bool {
 }
 
 // check assign type list to
-// a expression list. called in
+// an expression list. called in
 //     expr-list = func()
 func ascompatet(nl Nodes, nr *types.Type) []*Node {
        if nl.Len() != nr.NumFields() {
index 4222bf81c56faceac438e33142bd6154d55ef9df..e8168bdc2b359a893c966e344bee058c37071876 100644 (file)
@@ -17,7 +17,7 @@ type edgeMem struct {
        m *Value // phi for memory at dest of e
 }
 
-// a rewriteTarget is a value-argindex pair indicating
+// a rewriteTarget is a value-argindex pair indicating
 // where a rewrite is applied.  Note that this is for values,
 // not for block controls, because block controls are not targets
 // for the rewrites performed in inserting rescheduling checks.
index c435a5a0082bf58631923927c89e0734898f518f..b1cf7cdd9fa917a86948581ff18b33b67dafdde2 100644 (file)
@@ -632,7 +632,7 @@ func preprocess(ctxt *obj.Link, cursym *obj.LSym, newprog obj.ProgAlloc) {
                                //      B    end
                                //
                                // The NOP is needed to give the jumps somewhere to land.
-                               // It is a liblink NOP, not a ARM64 NOP: it encodes to 0 instruction bytes.
+                               // It is a liblink NOP, not an ARM64 NOP: it encodes to 0 instruction bytes.
                                q = q1
 
                                // MOV g_panic(g), R1
index 6359877a1b4eb8cc910cda5ced1cc487ab62cb60..4d945ad01932b21d306e3979013e7fbb2ecef80b 100644 (file)
@@ -123,7 +123,7 @@ func getattr(die *dwarf.DWDie, attr uint16) *dwarf.DWAttr {
        return nil
 }
 
-// Every DIE has at least a AT_name attribute (but it will only be
+// Every DIE has at least an AT_name attribute (but it will only be
 // written out if it is listed in the abbrev).
 func newdie(ctxt *Link, parent *dwarf.DWDie, abbrev int, name string, version int) *dwarf.DWDie {
        die := new(dwarf.DWDie)
index 8bd750bd8b3a006c8fa4b114c3d842962c3562a6..85d52e85009cf081c7357349d07eb21cf78c5e71 100644 (file)
@@ -66,7 +66,7 @@ type Header struct {
 // Only the first header is recorded in the Reader fields.
 //
 // Gzip files store a length and checksum of the uncompressed data.
-// The Reader will return a ErrChecksum when Read
+// The Reader will return an ErrChecksum when Read
 // reaches the end of the uncompressed data if it does not
 // have the expected length or checksum. Clients should treat data
 // returned by Read as tentative until they receive the io.EOF
index 2d48d4e82bb56538683168158b3ba45c776af052..b2c2aa921da3591a1a2cb63bd3b8a4bdc77b867c 100644 (file)
@@ -52,7 +52,7 @@ func ExampleWithCancel() {
        // 5
 }
 
-// This example passes a context with a arbitrary deadline to tell a blocking
+// This example passes a context with an arbitrary deadline to tell a blocking
 // function that it should abandon its work as soon as it gets to it.
 func ExampleWithDeadline() {
        d := time.Now().Add(50 * time.Millisecond)
index bc0c3e34629d377e6d0ea125d3f7333ab79ad635..e94585579eb2aff53214c7192ae90ceca3b69704 100644 (file)
@@ -37,7 +37,7 @@ type PrivateKey struct {
 // this error must be handled.
 var ErrInvalidPublicKey = errors.New("crypto/dsa: invalid public key")
 
-// ParameterSizes is a enumeration of the acceptable bit lengths of the primes
+// ParameterSizes is an enumeration of the acceptable bit lengths of the primes
 // in a set of DSA parameters. See FIPS 186-3, section 4.2.
 type ParameterSizes int
 
index 02848fd5954f81826ad1b8ba2700481fb26268e6..817bf7deb635ab12140d9b8fa3f5ad47920a468e 100644 (file)
@@ -49,7 +49,7 @@ type PublicKey struct {
        X, Y *big.Int
 }
 
-// PrivateKey represents a ECDSA private key.
+// PrivateKey represents an ECDSA private key.
 type PrivateKey struct {
        PublicKey
        D *big.Int
index cf30b43b5bfe90e70d1a86d234fbc5322af8453e..8edce749b17d927ce62bbc121fd18c450ec8139f 100644 (file)
@@ -172,7 +172,7 @@ func curveForCurveID(id CurveID) (elliptic.Curve, bool) {
 }
 
 // ecdheRSAKeyAgreement implements a TLS key agreement where the server
-// generates a ephemeral EC public/private key pair and signs it. The
+// generates an ephemeral EC public/private key pair and signs it. The
 // pre-master secret is then calculated using ECDH. The signature may
 // either be ECDSA or RSA.
 type ecdheKeyAgreement struct {
index b8e2770596e2e5839403b502bce116178fee1288..73193c34076bf2f7f96e2b1babe49c2a225fee4b 100644 (file)
@@ -374,7 +374,7 @@ func parseGeneralizedTime(bytes []byte) (ret time.Time, err error) {
 
 // PrintableString
 
-// parsePrintableString parses a ASN.1 PrintableString from the given byte
+// parsePrintableString parses an ASN.1 PrintableString from the given byte
 // array and returns it.
 func parsePrintableString(bytes []byte) (ret string, err error) {
        for _, b := range bytes {
@@ -406,7 +406,7 @@ func isPrintable(b byte) bool {
 
 // IA5String
 
-// parseIA5String parses a ASN.1 IA5String (ASCII string) from the given
+// parseIA5String parses an ASN.1 IA5String (ASCII string) from the given
 // byte slice and returns it.
 func parseIA5String(bytes []byte) (ret string, err error) {
        for _, b := range bytes {
@@ -421,7 +421,7 @@ func parseIA5String(bytes []byte) (ret string, err error) {
 
 // T61String
 
-// parseT61String parses a ASN.1 T61String (8-bit clean string) from the given
+// parseT61String parses an ASN.1 T61String (8-bit clean string) from the given
 // byte slice and returns it.
 func parseT61String(bytes []byte) (ret string, err error) {
        return string(bytes), nil
@@ -429,7 +429,7 @@ func parseT61String(bytes []byte) (ret string, err error) {
 
 // UTF8String
 
-// parseUTF8String parses a ASN.1 UTF8String (raw UTF-8) from the given byte
+// parseUTF8String parses an ASN.1 UTF8String (raw UTF-8) from the given byte
 // array and returns it.
 func parseUTF8String(bytes []byte) (ret string, err error) {
        if !utf8.Valid(bytes) {
@@ -992,7 +992,7 @@ func setDefaultValue(v reflect.Value, params fieldParameters) (ok bool) {
 //
 // The following tags on struct fields have special meaning to Unmarshal:
 //
-//     application specifies that a APPLICATION tag is used
+//     application specifies that an APPLICATION tag is used
 //     default:x   sets the default value for optional integer fields (only used if optional is also present)
 //     explicit    specifies that an additional, explicit tag wraps the implicit one
 //     optional    marks the field as ASN.1 OPTIONAL
index bbd3ee7308c5b2929e31fdd5350e14c24dac8174..b081431200b9d61984cee8e2bbdb7d23bab8af9c 100644 (file)
@@ -18,7 +18,7 @@ var (
        byteFFEncoder encoder = byteEncoder(0xff)
 )
 
-// encoder represents a ASN.1 element that is waiting to be marshaled.
+// encoder represents an ASN.1 element that is waiting to be marshaled.
 type encoder interface {
        // Len returns the number of bytes needed to marshal this element.
        Len() int
index 0832c597293751afe38b00f3b3811c60fdf31a2d..f719f25da1527a5d9e9334954f8733383db5dc1e 100644 (file)
@@ -200,7 +200,7 @@ func nrgbaModel(c Color) Color {
        if a == 0 {
                return NRGBA{0, 0, 0, 0}
        }
-       // Since Color.RGBA returns a alpha-premultiplied color, we should have r <= a && g <= a && b <= a.
+       // Since Color.RGBA returns an alpha-premultiplied color, we should have r <= a && g <= a && b <= a.
        r = (r * 0xffff) / a
        g = (g * 0xffff) / a
        b = (b * 0xffff) / a
@@ -218,7 +218,7 @@ func nrgba64Model(c Color) Color {
        if a == 0 {
                return NRGBA64{0, 0, 0, 0}
        }
-       // Since Color.RGBA returns a alpha-premultiplied color, we should have r <= a && g <= a && b <= a.
+       // Since Color.RGBA returns an alpha-premultiplied color, we should have r <= a && g <= a && b <= a.
        r = (r * 0xffff) / a
        g = (g * 0xffff) / a
        b = (b * 0xffff) / a
index b02544bc2a889475f1910af831553f9aacaf5676..2d6547b4aa0c7d2a7d0bc85aa2ba83c70c12d1b1 100644 (file)
@@ -1213,7 +1213,7 @@ func (cw *chunkWriter) writeHeader(p []byte) {
                }
        }
 
-       // Check for a explicit (and valid) Content-Length header.
+       // Check for an explicit (and valid) Content-Length header.
        hasCL := w.contentLength != -1
 
        if w.wants10KeepAlive && (isHEAD || hasCL || !bodyAllowedForStatus(w.status)) {
index f6da88c61cd87429da192723a26febd8315f444a..72ad90b924ad8a714670572444d46e912df2c044 100644 (file)
@@ -24,7 +24,7 @@ func hostname() (name string, err error) {
                        return "", NewSyscallError("ComputerNameEx", err)
                }
 
-               // If we received a ERROR_MORE_DATA, but n doesn't get larger,
+               // If we received an ERROR_MORE_DATA, but n doesn't get larger,
                // something has gone wrong and we may be in an infinite loop
                if n <= uint32(len(b)) {
                        return "", NewSyscallError("ComputerNameEx", err)
index e67b3cdcff7c7d9d5c65adf9be3b9a19613c307e..09e007d5603bf68e976cbc09f2e5c3bef0e2c08d 100644 (file)
@@ -176,7 +176,7 @@ type emptyInterface struct {
        word unsafe.Pointer
 }
 
-// nonEmptyInterface is the header for a interface value with methods.
+// nonEmptyInterface is the header for an interface value with methods.
 type nonEmptyInterface struct {
        // see ../runtime/iface.go:/Itab
        itab *struct {
index f8fe7b5defffbe4ccd03287d7bc1277bac503ef6..ea5b1361cb24fac8f351c9d8f8b5c9efbb7765f6 100644 (file)
@@ -16,7 +16,7 @@ type queue struct {
        dense  []entry
 }
 
-// A entry is an entry on a queue.
+// An entry is an entry on a queue.
 // It holds both the instruction pc and the actual thread.
 // Some queue entries are just place holders so that the machine
 // knows it has considered that pc. Such entries have t == nil.
index ce4d707e0684b20ea9f44a623a6ae17711cb125d..672d190f12da92df49645f2e2075da73aabf199d 100644 (file)
@@ -340,7 +340,7 @@ func unwindm(restore *bool) {
        // Call endcgo to do the accounting that cgocall will not have a
        // chance to do during an unwind.
        //
-       // In the case where a Go call originates from C, ncgo is 0
+       // In the case where a Go call originates from C, ncgo is 0
        // and there is no matching cgocall to end.
        if mp.ncgo > 0 {
                endcgo(mp)
index 68f32aa01bbb855366641b22da25cb376fe9e6ee..3aaa09d7036a2af070fb3795d4f5892f930ca2a2 100644 (file)
@@ -863,7 +863,7 @@ HaveSpan:
 // Large spans have a minimum size of 1MByte. The maximum number of large spans to support
 // 1TBytes is 1 million, experimentation using random sizes indicates that the depth of
 // the tree is less that 2x that of a perfectly balanced tree. For 1TByte can be referenced
-// by a perfectly balanced tree with a depth of 20. Twice that is an acceptable 40.
+// by a perfectly balanced tree with a depth of 20. Twice that is an acceptable 40.
 func (h *mheap) isLargeSpan(npages uintptr) bool {
        return npages >= uintptr(len(h.free))
 }
index 7033e96c39e4908e1f48db2ea2a61e1575d46368..7f17bc6a0df36c8afec28f4c712541b46fbd3394 100644 (file)
@@ -641,7 +641,7 @@ func (f *extFloat) ShortestDecimal(d *decimalSlice, lower, upper *extFloat) bool
 // adjustLastDigit modifies d = x-currentDiff*ε, to get closest to
 // d = x-targetDiff*ε, without becoming smaller than x-maxDiff*ε.
 // It assumes that a decimal digit is worth ulpDecimal*ε, and that
-// all data is known with a error estimate of ulpBinary*ε.
+// all data is known with an error estimate of ulpBinary*ε.
 func adjustLastDigit(d *decimalSlice, currentDiff, targetDiff, maxDiff, ulpDecimal, ulpBinary uint64) bool {
        if ulpDecimal < 2*ulpBinary {
                // Approximation is too wide.
index c0f1a29f645c527c60d2dc3c3090b2945044b952..d296a55cda1fb5429193c696ca76ef40d1f2e796 100644 (file)
@@ -5,7 +5,7 @@
 // license that can be found in the LICENSE file.
 
 // Test various parsing cases that are a little
-// different now that send is a statement, not a expression.
+// different now that send is a statement, not an expression.
 
 package main
 
index 9620d3d0cb21a8cb11d8d9723d2332eac6704274..bdb2a940c8f4bdfc131072131372841794e25465 100644 (file)
@@ -4,7 +4,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-// Issue 15747: If a ODCL is dropped, for example when inlining,
+// Issue 15747: If an ODCL is dropped, for example when inlining,
 // then it's easy to end up not initializing the '&x' pseudo-variable
 // to point to an actual allocation. The liveness analysis will detect
 // this and abort the computation, so this test just checks that the