Commit fb91559f authored by Rui Ueyama's avatar Rui Ueyama Committed by Brad Fitzpatrick

all: fix typos

LGTM=bradfitz
R=golang-codereviews, bradfitz
CC=golang-codereviews
https://golang.org/cl/88670043
parent 58b86e50
...@@ -334,7 +334,7 @@ func parsePAX(r io.Reader) (map[string]string, error) { ...@@ -334,7 +334,7 @@ func parsePAX(r io.Reader) (map[string]string, error) {
return nil, ErrHeader return nil, ErrHeader
} }
// Extract everything between the decimal and the n -1 on the // Extract everything between the decimal and the n -1 on the
// beginning to to eat the ' ', -1 on the end to skip the newline. // beginning to eat the ' ', -1 on the end to skip the newline.
var record []byte var record []byte
record, buf = buf[sp+1:n-1], buf[n:] record, buf = buf[sp+1:n-1], buf[n:]
// The first equals is guaranteed to mark the end of the key. // The first equals is guaranteed to mark the end of the key.
......
...@@ -17,7 +17,7 @@ func Example() { ...@@ -17,7 +17,7 @@ func Example() {
l.InsertBefore(3, e4) l.InsertBefore(3, e4)
l.InsertAfter(2, e1) l.InsertAfter(2, e1)
// Iterate through list and and print its contents. // Iterate through list and print its contents.
for e := l.Front(); e != nil; e = e.Next() { for e := l.Front(); e != nil; e = e.Next() {
fmt.Println(e.Value) fmt.Println(e.Value)
} }
......
...@@ -47,7 +47,7 @@ func BenchmarkAESGCMOpen1K(b *testing.B) { ...@@ -47,7 +47,7 @@ func BenchmarkAESGCMOpen1K(b *testing.B) {
} }
// If we test exactly 1K blocks, we would generate exact multiples of // If we test exactly 1K blocks, we would generate exact multiples of
// the cipher's block size, and and the cipher stream fragments would // the cipher's block size, and the cipher stream fragments would
// always be wordsize aligned, whereas non-aligned is a more typical // always be wordsize aligned, whereas non-aligned is a more typical
// use-case. // use-case.
const almost1K = 1024 - 5 const almost1K = 1024 - 5
......
...@@ -188,7 +188,7 @@ type Var struct { ...@@ -188,7 +188,7 @@ type Var struct {
// Func contains additional per-symbol information specific to functions. // Func contains additional per-symbol information specific to functions.
type Func struct { type Func struct {
Args int // size in bytes of of argument frame: inputs and outputs Args int // size in bytes of argument frame: inputs and outputs
Frame int // size in bytes of local variable frame Frame int // size in bytes of local variable frame
Leaf bool // function omits save of link register (ARM) Leaf bool // function omits save of link register (ARM)
Var []Var // detail about local variables Var []Var // detail about local variables
......
...@@ -266,7 +266,7 @@ func (enc *Encoding) decode(dst, src []byte) (n int, end bool, err error) { ...@@ -266,7 +266,7 @@ func (enc *Encoding) decode(dst, src []byte) (n int, end bool, err error) {
// 7, 5 and 2 are not valid padding lengths, and so 1, 3 and 6 are not // 7, 5 and 2 are not valid padding lengths, and so 1, 3 and 6 are not
// valid dlen values. See RFC 4648 Section 6 "Base 32 Encoding" listing // valid dlen values. See RFC 4648 Section 6 "Base 32 Encoding" listing
// the five valid padding lengths, and Section 9 "Illustrations and // the five valid padding lengths, and Section 9 "Illustrations and
// Examples" for an illustration for how the the 1st, 3rd and 6th base32 // Examples" for an illustration for how the 1st, 3rd and 6th base32
// src bytes do not yield enough information to decode a dst byte. // src bytes do not yield enough information to decode a dst byte.
if dlen == 1 || dlen == 3 || dlen == 6 { if dlen == 1 || dlen == 3 || dlen == 6 {
return n, false, CorruptInputError(olen - len(src) - 1) return n, false, CorruptInputError(olen - len(src) - 1)
......
...@@ -131,7 +131,7 @@ func TestQPExhaustive(t *testing.T) { ...@@ -131,7 +131,7 @@ func TestQPExhaustive(t *testing.T) {
return return
} }
if strings.HasSuffix(errStr, "0x0a") || strings.HasSuffix(errStr, "0x0d") { if strings.HasSuffix(errStr, "0x0a") || strings.HasSuffix(errStr, "0x0d") {
// bunch of cases; since whitespace at the end of of a line before \n is removed. // bunch of cases; since whitespace at the end of a line before \n is removed.
return return
} }
} }
......
...@@ -987,7 +987,7 @@ func TestClientTrailers(t *testing.T) { ...@@ -987,7 +987,7 @@ func TestClientTrailers(t *testing.T) {
// TODO: golang.org/issue/7759: there's no way yet for // TODO: golang.org/issue/7759: there's no way yet for
// the server to set trailers without hijacking, so do // the server to set trailers without hijacking, so do
// that for now, just to test the client. Later, in // that for now, just to test the client. Later, in
// Go 1.4, it should be be implicit that any mutations // Go 1.4, it should be implicit that any mutations
// to w.Header() after the initial write are the // to w.Header() after the initial write are the
// trailers to be sent, if and only if they were // trailers to be sent, if and only if they were
// previously declared with w.Header().Set("Trailer", // previously declared with w.Header().Set("Trailer",
......
...@@ -102,7 +102,7 @@ const ( ...@@ -102,7 +102,7 @@ const (
// std0x records the std values for "01", "02", ..., "06". // std0x records the std values for "01", "02", ..., "06".
var std0x = [...]int{stdZeroMonth, stdZeroDay, stdZeroHour12, stdZeroMinute, stdZeroSecond, stdYear} var std0x = [...]int{stdZeroMonth, stdZeroDay, stdZeroHour12, stdZeroMinute, stdZeroSecond, stdYear}
// startsWithLowerCase reports whether the the string has a lower-case letter at the beginning. // startsWithLowerCase reports whether the string has a lower-case letter at the beginning.
// Its purpose is to prevent matching strings like "Month" when looking for "Mon". // Its purpose is to prevent matching strings like "Month" when looking for "Mon".
func startsWithLowerCase(str string) bool { func startsWithLowerCase(str string) bool {
if len(str) == 0 { if len(str) == 0 {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment