mirror of
https://github.com/bluekeyes/go-gitdiff
synced 2026-06-08 13:18:30 +00:00
ccf0c58db8
Call Next() to advance the parser state until it returns a non-nil error, then check if the error is io.EOF. This makes EOF handling easier and also means that Line() and PeekLine() can be called multiple times without changing state. The next step is to update parse functions to return an internal marker error if they are called on an invalid line. This should improve correctness and remove the duplication of testing a condition and then calling a parse function, which checks the same condition.