this repo has no description
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Improve docs for StringReader and LineReader

Document the method as part of the type so it is processed by godoc.

+16 -16
+16 -16
gitdiff/io.go
··· 6 6 ) 7 7 8 8 // StringReader is the interface that wraps the ReadString method. 9 + // 10 + // ReadString reads until the first occurrence of delim in the input, returning 11 + // a string containing the data up to and including the delimiter. If 12 + // ReadString encounters an error before finding a delimiter, it returns the 13 + // data read before the error and the error itself (often io.EOF). ReadString 14 + // returns err != nil if and only if the returned data does not end in delim. 9 15 type StringReader interface { 10 - // ReadString reads until the first occurrence of delim in the input, 11 - // returning a string containing the data up to and including the 12 - // delimiter. If ReadString encounters an error before finding a delimiter, 13 - // it returns the data read before the error and the error itself (often 14 - // io.EOF). ReadString returns err != nil if and only if the returned data 15 - // does not end in delim. 16 16 ReadString(delim byte) (string, error) 17 17 } 18 18 19 19 // LineReader is the interface that wraps the ReadLine method. 20 + // 21 + // ReadLine reads the next full line in the input, returing the the data 22 + // including the line ending character(s) and the zero-indexed line number. If 23 + // ReadLine encounters an error before reaching the end of the line, it returns 24 + // the data read before the error and the error itself (often io.EOF). ReadLine 25 + // returns err != nil if and only if the returned data is not a complete line. 26 + // 27 + // If an implementation defines other methods for reading the same input, line 28 + // numbers may be incorrect if calls to ReadLine are mixed with calls to other 29 + // read methods. 20 30 type LineReader interface { 21 - // ReadLine reads the next full line in the input, returing the the data 22 - // including the line ending character(s) and the zero-indexed line number. 23 - // If ReadLine encounters an error before reaching the end of the line, it 24 - // returns the data read before the error and the error itself (often 25 - // io.EOF). ReadLine returns err != nil if and only if the returned data is 26 - // not a complete line. 27 - // 28 - // If the implementation defines other methods for reading the same input, 29 - // line numbers may be incorrect if calls to ReadLine are mixed with calls 30 - // to other read methods. 31 31 ReadLine() (string, int, error) 32 32 } 33 33