bufioNewReader
bufio.NewReader is a constructor in the Go standard library that returns a new buffered reader wrapping an underlying io.Reader. Its primary purpose is to improve efficiency by buffering input reads, reducing the number of calls to the underlying source such as a file or network connection.
The canonical form is func NewReader(rd io.Reader) *Reader, which creates a Reader with a default internal buffer
A bufio.Reader fills its internal buffer from the underlying reader as needed. Read copies data from the
Notable limitations include that a bufio.Reader is not safe for concurrent use by multiple goroutines; external