@@ -35,15 +35,14 @@ type readStringReader interface {
3535// numbers may be incorrect if calls to ReadLine are mixed with calls to other
3636// read methods.
3737type LineReader interface {
38- // TODO(bkeyes): consider making lineno int64 to match fragment types
39- ReadLine () (string , int , error )
38+ ReadLine () (string , int64 , error )
4039}
4140
4241// NewLineReader returns a LineReader starting at a specific line and using the
4342// newline character, \n, as a line separator. If r is a StringReader, it is
4443// used directly. Otherwise, it is wrapped in a way that may read extra data
4544// from the underlying input.
46- func NewLineReader (r io.Reader , lineno int ) LineReader {
45+ func NewLineReader (r io.Reader , lineno int64 ) LineReader {
4746 sr , ok := r .(readStringReader )
4847 if ! ok {
4948 sr = bufio .NewReader (r )
@@ -53,10 +52,10 @@ func NewLineReader(r io.Reader, lineno int) LineReader {
5352
5453type lineReader struct {
5554 r readStringReader
56- n int
55+ n int64
5756}
5857
59- func (lr * lineReader ) ReadLine () (line string , lineno int , err error ) {
58+ func (lr * lineReader ) ReadLine () (line string , lineno int64 , err error ) {
6059 lineno = lr .n
6160 line , err = lr .r .ReadString ('\n' )
6261 if err == nil {
0 commit comments