From: Rob Pike Date: Mon, 24 Jan 2011 18:19:23 +0000 (-0800) Subject: encoding/line: fix up a few typos and infelicities in the doc comments X-Git-Tag: weekly.2011-02-01~99 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=4871d0d19ae5cde1b81d1817e4144ee63f1e40c5;p=gostls13.git encoding/line: fix up a few typos and infelicities in the doc comments R=anschelsc, agl1 CC=golang-dev https://golang.org/cl/3988045 --- diff --git a/src/pkg/encoding/line/line.go b/src/pkg/encoding/line/line.go index 92dddcb996..f1c1061419 100644 --- a/src/pkg/encoding/line/line.go +++ b/src/pkg/encoding/line/line.go @@ -2,8 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -// This package implements a Reader which handles reading \r and \r\n -// deliminated lines. +// The line package implements a Reader that reads lines delimited by '\n' or ' \r\n'. package line import ( @@ -11,8 +10,7 @@ import ( "os" ) -// Reader reads lines from an io.Reader (which may use either '\n' or -// '\r\n'). +// Reader reads lines, delimited by '\n' or \r\n', from an io.Reader. type Reader struct { buf []byte consumed int @@ -20,11 +18,13 @@ type Reader struct { err os.Error } -func NewReader(in io.Reader, maxLineLength int) *Reader { +// NewReader returns a new Reader that will read successive +// lines from the input Reader. +func NewReader(input io.Reader, maxLineLength int) *Reader { return &Reader{ buf: make([]byte, 0, maxLineLength), consumed: 0, - in: in, + in: input, } }