Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

proposal: Go 2: bytes: remove NewBufferString #26281

robpike opened this issue Jul 9, 2018 · 0 comments


Copy link

commented Jul 9, 2018

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.

@robpike robpike added the Go2 label Jul 9, 2018

@ianlancetaylor ianlancetaylor added this to the Go2 milestone Jul 9, 2018

@ianlancetaylor ianlancetaylor changed the title bytes: remove NewBufferString proposal: Go 2: bytes: remove NewBufferString Oct 2, 2018

@gopherbot gopherbot added the Proposal label Oct 2, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
3 participants
You can’t perform that action at this time.