Skip to content

bytes.Buffer Write() should clearly document the buffer grows on demand #5152

@ghost

Description

In /pkg/bytes/buffer.go, func (b *Buffer) Write(p []byte) should clearly document that
calling Write will always grow the buffer if needed.

Neither the function comment for Write nor the type comment for bytes.Buffer document
that the buffer grows on-demand. The documentation should make this clear.

Suggest changing the first sentence of the comment to read:
"Write appends the contents of p to the buffer growing the capacity if needed."

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions