func scanLinesNondestructive(data []byte, atEOF bool) (advance int, token []byte, err error) {
	if atEOF && len(data) == 0 {
		return 0, nil, nil
	}
	if i := bytes.IndexByte(data, '\n'); i >= 0 {
		// We have a full newline-terminated line.
		return i + 1, data[0 : i+1], nil
	}
	// If we're at EOF, we have a final, non-terminated line. Return it.
	if atEOF {
		return len(data), data, nil
	}
	// Request more data.
	return 0, nil, nil
}
// scanLinesNondestructive does not destroy the \n or the possible \r\n from a
// line. Otherwise it is like
// https://golang.org/src/bufio/scan.go?s=11522:11600#L330
scanLinesNondestructive does not destroy the \n or the possible \r\n from a
line.
// scanLinesNondestructive does not destroy the \ n or the possible \ r \ n from a // line . Otherwise it is like // https : // golang . org / src / bufio / scan . go?s = 11522 : 11600#L330
func scanLinesNondestructive(data []byte, atEOF bool) (advance int, token []byte, err error) {
	if atEOF && len(data) == 0 {
		return 0, nil, nil
	}
	if i := bytes.IndexByte(data, '\n'); i >= 0 {
		return i + 1, data[0 : i+1], nil
	}
	if atEOF {
		return len(data), data, nil
	}
	return 0, nil, nil
}
func scanLinesNondestructive ( data [ ] byte , atEOF bool ) ( advance int , token [ ] byte , err error ) { if atEOF && len ( data ) == 0 { return 0 , nil , nil } if i := bytes . IndexByte ( data , '\n' ) ; i >= 0 { return i + 1 , data [ 0 : i + 1 ] , nil } if atEOF { return len ( data ) , data , nil } return 0 , nil , nil }
scanLinesNondestructive does not destroy the \n or the possible \r\n from a
line.
scanLinesNondestructive does not destroy the \ n or the possible \ r \ n from a line .
// We have a full newline-terminated line. // If we're at EOF, we have a final, non-terminated line. Return it. // Request more data.