Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
proposal: Go 2: bytes: remove NewBufferString #26281
The constructor is often misused and confuses people. It can be used to put initial contents into a buffer that will be written into after, but so can buf.Write. Meanwhile, NewReader handles the case that most beginners misuse, calling NewBufferString when they only need NewBuffer.
This function's use case is not worth the confusion it causes and it should be deleted from the library.