Closed sttk closed 1 month ago
This PR changes LineIter's APIs:
LineIter
Changes the 'more' flag returned by LineIter#Next to 'exists' flag
LineIter#Next
line, exists := iter.Next() // 'exists' indicates that the current 'line' is valid if exists { fmt.Println(line) }
Adds LineIter#HasNext that indicates the following LineIter#Next call returns a valid line string.
LineIter#HasNext
for iter.HasNext() { line, _ := iter.Next() fmt.Println(line) }
Closes #25
This PR changes
LineIter
's APIs:Changes the 'more' flag returned by
LineIter#Next
to 'exists' flagAdds
LineIter#HasNext
that indicates the followingLineIter#Next
call returns a valid line string.Closes #25