Skip to content

code opt: replace bytes.Buffer with strings.Builder - #151

Merged
willnorris merged 1 commit into
google:masterfrom
hcraM41:master
Apr 24, 2025
Merged

willnorris merged 1 commit into
google:masterfrom
hcraM41:master

Conversation

@hcraM41

@hcraM41 hcraM41 commented Apr 24, 2025

Copy link
Copy Markdown
Contributor

a Builder is used to efficiently build a string using Write methods. it minimizes memory copying. Builder directly converts the underlying []byte to a string type and returns it.

@willnorris
willnorris merged commit b64aef0 into google:master Apr 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants