Commit 42c8904f authored by Shenghou Ma's avatar Shenghou Ma

all: fix the the typos

Fixes #4420.

R=golang-dev, rsc, remyoudompheng
CC=golang-dev
https://golang.org/cl/6854080
parent 42cc4ea6
...@@ -74,7 +74,7 @@ func New(n int) *Ring { ...@@ -74,7 +74,7 @@ func New(n int) *Ring {
return r return r
} }
// Link connects ring r with with ring s such that r.Next() // Link connects ring r with ring s such that r.Next()
// becomes s and returns the original value for r.Next(). // becomes s and returns the original value for r.Next().
// r must not be empty. // r must not be empty.
// //
......
...@@ -184,7 +184,7 @@ func Read(r io.Reader, order ByteOrder, data interface{}) error { ...@@ -184,7 +184,7 @@ func Read(r io.Reader, order ByteOrder, data interface{}) error {
// values, or a pointer to such data. // values, or a pointer to such data.
// Bytes written to w are encoded using the specified byte order // Bytes written to w are encoded using the specified byte order
// and read from successive fields of the data. // and read from successive fields of the data.
// When writing structs, zero values are are written for fields // When writing structs, zero values are written for fields
// with blank (_) field names. // with blank (_) field names.
func Write(w io.Writer, order ByteOrder, data interface{}) error { func Write(w io.Writer, order ByteOrder, data interface{}) error {
// Fast path for basic types. // Fast path for basic types.
......
...@@ -22,7 +22,7 @@ import ( ...@@ -22,7 +22,7 @@ import (
// //
// If UseCRLF is true, the Writer ends each record with \r\n instead of \n. // If UseCRLF is true, the Writer ends each record with \r\n instead of \n.
type Writer struct { type Writer struct {
Comma rune // Field delimiter (set to to ',' by NewWriter) Comma rune // Field delimiter (set to ',' by NewWriter)
UseCRLF bool // True to use \r\n as the line terminator UseCRLF bool // True to use \r\n as the line terminator
w *bufio.Writer w *bufio.Writer
} }
......
...@@ -450,7 +450,7 @@ func (c *Collator) keyFromElems(buf *Buffer, ws []colElem) { ...@@ -450,7 +450,7 @@ func (c *Collator) keyFromElems(buf *Buffer, ws []colElem) {
} }
// Derive the quaternary weights from the options and other levels. // Derive the quaternary weights from the options and other levels.
// Note that we represent maxQuaternary as 0xFF. The first byte of the // Note that we represent maxQuaternary as 0xFF. The first byte of the
// representation of a a primary weight is always smaller than 0xFF, // representation of a primary weight is always smaller than 0xFF,
// so using this single byte value will compare correctly. // so using this single byte value will compare correctly.
if Quaternary <= c.Strength && c.Alternate >= AltShifted { if Quaternary <= c.Strength && c.Alternate >= AltShifted {
if c.Alternate == AltShiftTrimmed { if c.Alternate == AltShiftTrimmed {
......
...@@ -452,7 +452,7 @@ func trimRight(s string) string { ...@@ -452,7 +452,7 @@ func trimRight(s string) string {
// stripCommonPrefix removes a common prefix from /*-style comment lines (unless no // stripCommonPrefix removes a common prefix from /*-style comment lines (unless no
// comment line is indented, all but the first line have some form of space prefix). // comment line is indented, all but the first line have some form of space prefix).
// The prefix is computed using heuristics such that is is likely that the comment // The prefix is computed using heuristics such that is likely that the comment
// contents are nicely laid out after re-printing each line using the printer's // contents are nicely laid out after re-printing each line using the printer's
// current indentation. // current indentation.
// //
......
...@@ -14,7 +14,7 @@ import ( ...@@ -14,7 +14,7 @@ import (
) )
// nextJSCtx returns the context that determines whether a slash after the // nextJSCtx returns the context that determines whether a slash after the
// given run of tokens tokens starts a regular expression instead of a division // given run of tokens starts a regular expression instead of a division
// operator: / or /=. // operator: / or /=.
// //
// This assumes that the token run does not include any string tokens, comment // This assumes that the token run does not include any string tokens, comment
......
...@@ -163,7 +163,7 @@ func (d *decoder) processDHT(n int) error { ...@@ -163,7 +163,7 @@ func (d *decoder) processDHT(n int) error {
// Returns the next Huffman-coded value from the bit stream, decoded according to h. // Returns the next Huffman-coded value from the bit stream, decoded according to h.
// TODO(nigeltao): This decoding algorithm is simple, but slow. A lookahead table, instead of always // TODO(nigeltao): This decoding algorithm is simple, but slow. A lookahead table, instead of always
// peeling off only 1 bit at at time, ought to be faster. // peeling off only 1 bit at time, ought to be faster.
func (d *decoder) decodeHuffman(h *huffman) (uint8, error) { func (d *decoder) decodeHuffman(h *huffman) (uint8, error) {
if h.length == 0 { if h.length == 0 {
return 0, FormatError("uninitialized Huffman table") return 0, FormatError("uninitialized Huffman table")
......
...@@ -21,7 +21,7 @@ import ( ...@@ -21,7 +21,7 @@ import (
type Server struct { type Server struct {
URL string // base URL of form http://ipaddr:port with no trailing slash URL string // base URL of form http://ipaddr:port with no trailing slash
Listener net.Listener Listener net.Listener
TLS *tls.Config // nil if not using using TLS TLS *tls.Config // nil if not using TLS
// Config may be changed after calling NewUnstartedServer and // Config may be changed after calling NewUnstartedServer and
// before Start or StartTLS. // before Start or StartTLS.
......
...@@ -127,7 +127,7 @@ type response struct { ...@@ -127,7 +127,7 @@ type response struct {
// requestBodyLimitHit is set by requestTooLarge when // requestBodyLimitHit is set by requestTooLarge when
// maxBytesReader hits its max size. It is checked in // maxBytesReader hits its max size. It is checked in
// WriteHeader, to make sure we don't consume the the // WriteHeader, to make sure we don't consume the
// remaining request body to try to advance to the next HTTP // remaining request body to try to advance to the next HTTP
// request. Instead, when this is set, we stop reading // request. Instead, when this is set, we stop reading
// subsequent requests on this connection and stop reading // subsequent requests on this connection and stop reading
......
...@@ -281,7 +281,7 @@ func TestTransportMaxPerHostIdleConns(t *testing.T) { ...@@ -281,7 +281,7 @@ func TestTransportMaxPerHostIdleConns(t *testing.T) {
c := &Client{Transport: tr} c := &Client{Transport: tr}
// Start 3 outstanding requests and wait for the server to get them. // Start 3 outstanding requests and wait for the server to get them.
// Their responses will hang until we we write to resch, though. // Their responses will hang until we write to resch, though.
donech := make(chan bool) donech := make(chan bool)
doReq := func() { doReq := func() {
resp, err := c.Get(ts.URL) resp, err := c.Get(ts.URL)
......
...@@ -1338,7 +1338,7 @@ func cachePut(k cacheKey, t *rtype) Type { ...@@ -1338,7 +1338,7 @@ func cachePut(k cacheKey, t *rtype) Type {
return t return t
} }
// ChanOf returns the channel type with the given direction and and element type. // ChanOf returns the channel type with the given direction and element type.
// For example, if t represents int, ChanOf(RecvDir, t) represents <-chan int. // For example, if t represents int, ChanOf(RecvDir, t) represents <-chan int.
// //
// The gc runtime imposes a limit of 64 kB on channel element types. // The gc runtime imposes a limit of 64 kB on channel element types.
......
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