1
0
mirror of https://github.com/golang/go synced 2024-07-03 00:40:45 +00:00

all: fix article typos

a -> an

Change-Id: I7362bdc199e83073a712be657f5d9ba16df3077e
Reviewed-on: https://go-review.googlesource.com/63850
Reviewed-by: Rob Pike <r@golang.org>
This commit is contained in:
Kunpei Sakai 2017-09-15 10:24:47 +09:00 committed by Rob Pike
parent 33cb1481f2
commit 5a986eca86
23 changed files with 29 additions and 29 deletions

View 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}

View 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 {

View 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() {

View File

@ -17,7 +17,7 @@ type edgeMem struct {
m *Value // phi for memory at dest of e
}
// a rewriteTarget is a 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.

View 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

View 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)

View 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

View 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)

View 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

View 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

View 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 {

View 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

View 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

View 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

View 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)) {

View 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)

View 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 {

View 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.

View 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 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)

View 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 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))
}

View 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.

View 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

View 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