···66)
7788// StringReader is the interface that wraps the ReadString method.
99+//
1010+// ReadString reads until the first occurrence of delim in the input, returning
1111+// a string containing the data up to and including the delimiter. If
1212+// ReadString encounters an error before finding a delimiter, it returns the
1313+// data read before the error and the error itself (often io.EOF). ReadString
1414+// returns err != nil if and only if the returned data does not end in delim.
915type StringReader interface {
1010- // ReadString reads until the first occurrence of delim in the input,
1111- // returning a string containing the data up to and including the
1212- // delimiter. If ReadString encounters an error before finding a delimiter,
1313- // it returns the data read before the error and the error itself (often
1414- // io.EOF). ReadString returns err != nil if and only if the returned data
1515- // does not end in delim.
1616 ReadString(delim byte) (string, error)
1717}
18181919// LineReader is the interface that wraps the ReadLine method.
2020+//
2121+// ReadLine reads the next full line in the input, returing the the data
2222+// including the line ending character(s) and the zero-indexed line number. If
2323+// ReadLine encounters an error before reaching the end of the line, it returns
2424+// the data read before the error and the error itself (often io.EOF). ReadLine
2525+// returns err != nil if and only if the returned data is not a complete line.
2626+//
2727+// If an implementation defines other methods for reading the same input, line
2828+// numbers may be incorrect if calls to ReadLine are mixed with calls to other
2929+// read methods.
2030type LineReader interface {
2121- // ReadLine reads the next full line in the input, returing the the data
2222- // including the line ending character(s) and the zero-indexed line number.
2323- // If ReadLine encounters an error before reaching the end of the line, it
2424- // returns the data read before the error and the error itself (often
2525- // io.EOF). ReadLine returns err != nil if and only if the returned data is
2626- // not a complete line.
2727- //
2828- // If the implementation defines other methods for reading the same input,
2929- // line numbers may be incorrect if calls to ReadLine are mixed with calls
3030- // to other read methods.
3131 ReadLine() (string, int, error)
3232}
3333