Created by: ethanf
It's unclear if we should copy Message.rawMessage
here. I chose not to in case the original buffer is changed. I think the point of Message.CopyInto()
is to decouple the new instance from the old, and shouldn't be used in high-performance scenarios anyway.
I removed the error return value because I don't understand when you'd expect an error. We could add it back for API compatibility. I don't think the name CopyInto()
is idiomatic Go, but I don't see any obvious examples for naming something similar.