Skip to content

Commit

Permalink
all: fix some typos
Browse files Browse the repository at this point in the history
Change-Id: I7dfae0fc91c2d70873ec7ec920be7c0a4888153a
Reviewed-on: https://go-review.googlesource.com/c/go/+/390175
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Daniel Martí <mvdan@mvdan.cc>
Trust: Daniel Martí <mvdan@mvdan.cc>
  • Loading branch information
kortschak authored and mvdan committed Mar 6, 2022
1 parent 45f4544 commit da2773f
Show file tree
Hide file tree
Showing 9 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion src/compress/bzip2/huffman.go
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ func buildHuffmanNode(t *huffmanTree, codes []huffmanCode, level uint32) (nodeIn

// If this function was called recursively then we know that
// len(codes) >= 2 because, otherwise, we would have hit the
// "leaf node" case, below, and not recursed.
// "leaf node" case, below, and not recurred.
//
// However, for the initial call it's possible that len(codes)
// is zero or one. Both cases are invalid because a zero length
Expand Down
2 changes: 1 addition & 1 deletion src/crypto/tls/conn.go
Original file line number Diff line number Diff line change
Expand Up @@ -758,7 +758,7 @@ func (c *Conn) readRecordOrCCS(expectChangeCipherSpec bool) error {
return nil
}

// retryReadRecord recurses into readRecordOrCCS to drop a non-advancing record, like
// retryReadRecord recurs into readRecordOrCCS to drop a non-advancing record, like
// a warning alert, empty application_data, or a change_cipher_spec in TLS 1.3.
func (c *Conn) retryReadRecord(expectChangeCipherSpec bool) error {
c.retryCount++
Expand Down
2 changes: 1 addition & 1 deletion src/crypto/x509/parser.go
Original file line number Diff line number Diff line change
Expand Up @@ -855,7 +855,7 @@ func parseCertificate(der []byte) (*Certificate, error) {
}
// we ignore the presence of negative serial numbers because
// of their prevalence, despite them being invalid
// TODO(rolandshoemaker): revist this decision, there are currently
// TODO(rolandshoemaker): revisit this decision, there are currently
// only 10 trusted certificates with negative serial numbers
// according to censys.io.
cert.SerialNumber = serial
Expand Down
2 changes: 1 addition & 1 deletion src/debug/dwarf/entry.go
Original file line number Diff line number Diff line change
Expand Up @@ -1122,7 +1122,7 @@ func (d *Data) dwarf2Ranges(u *unit, base uint64, ranges int64, ret [][2]uint64)
return ret, nil
}

// dwarf5Ranges interpets a debug_rnglists sequence, see DWARFv5 section
// dwarf5Ranges interprets a debug_rnglists sequence, see DWARFv5 section
// 2.17.3 (page 53).
func (d *Data) dwarf5Ranges(u *unit, cu *Entry, base uint64, ranges int64, ret [][2]uint64) ([][2]uint64, error) {
var addrBase int64
Expand Down
4 changes: 2 additions & 2 deletions src/html/template/escape.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ func escapeTemplate(tmpl *Template, node parse.Node, name string) error {
}

// evalArgs formats the list of arguments into a string. It is equivalent to
// fmt.Sprint(args...), except that it deferences all pointers.
// fmt.Sprint(args...), except that it dereferences all pointers.
func evalArgs(args ...any) string {
// Optimization for simple common case of a single string argument.
if len(args) == 1 {
Expand Down Expand Up @@ -690,7 +690,7 @@ func (e *escaper) escapeTemplateBody(c context, t *template.Template) (context,
return c.eq(c1)
}
// We need to assume an output context so that recursive template calls
// take the fast path out of escapeTree instead of infinitely recursing.
// take the fast path out of escapeTree instead of infinitely recurring.
// Naively assuming that the input context is the same as the output
// works >90% of the time.
e.output[t.Name()] = c
Expand Down
2 changes: 1 addition & 1 deletion src/index/suffixarray/sais.go
Original file line number Diff line number Diff line change
Expand Up @@ -656,7 +656,7 @@ func recurse_32(sa, oldTmp []int32, numLMS, maxID int) {
dst, saTmp, text := sa[:numLMS], sa[numLMS:len(sa)-numLMS], sa[len(sa)-numLMS:]

// Set up temporary space for recursive call.
// We must pass sais_32 a tmp buffer wiith at least maxID entries.
// We must pass sais_32 a tmp buffer with at least maxID entries.
//
// The subproblem is guaranteed to have length at most len(sa)/2,
// so that sa can hold both the subproblem and its suffix array.
Expand Down
2 changes: 1 addition & 1 deletion src/index/suffixarray/sais2.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/math/big/nat.go
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,7 @@ func karatsuba(z, x, y nat) {
karatsuba(p, xd, yd)

// save original z2:z0
// (ok to use upper half of z since we're done recursing)
// (ok to use upper half of z since we're done recurring)
r := z[n*4:]
copy(r, z[:n*2])

Expand Down
2 changes: 1 addition & 1 deletion src/net/lookup.go
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ func withUnexpiredValuesPreserved(lookupCtx context.Context) context.Context {
// It returns a slice of that host's IPv4 and IPv6 addresses.
func (r *Resolver) lookupIPAddr(ctx context.Context, network, host string) ([]IPAddr, error) {
// Make sure that no matter what we do later, host=="" is rejected.
// parseIP, for example, does accept empty strings.
// parseIPZone, for example, does accept empty strings.
if host == "" {
return nil, &DNSError{Err: errNoSuchHost.Error(), Name: host, IsNotFound: true}
}
Expand Down

0 comments on commit da2773f

Please sign in to comment.