Replies: 0 comments 1 reply
-
Is this More convention something other file readers in golang do? My initial impression (coming from what we do in typescript) is that I do think have a More (or I've seen it called Peek in other apis) is useful on its own even when its still nice to use next to do the iteration. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
It would be nice to introduce some kind of
More()
style convenience like in the rosbag reader example here: https://github.com/foxglove/go-rosbag#reading-a-bag-fileI think this can probably be done backward compatibly with the existing calling style, which is to break out of the loop on EOF. If using More-style, the EOF-producing call would not be made.
Let me know if it seems desirable and I may raise a patch.
Beta Was this translation helpful? Give feedback.
All reactions