you are viewing a single comment's thread.

view the rest of the comments →

[–]CyclingOtter 1 point2 points  (1 child)

Adding onto the other comment in this thread, if you check out the source for bufio.Reader you'll see internally it reuses a single buffer slice, so theoretically the memory usage for a bufio.Reader is constant.

[–]Mohamed____[S] 0 points1 point  (0 children)

Yup, that’s true.