*: use strings.Builder instead of bytes.Buffer#15908
*: use strings.Builder instead of bytes.Buffer#15908ahrtr merged 1 commit intoetcd-io:mainfrom cuishuang:main
Conversation
|
Thanks for submitting the PR. Please open an issue and link |
Thanks for the suggestion. added |
lavacat
left a comment
There was a problem hiding this comment.
please make sure code is compiling: make build
|
@cuishuang please address failing "Static Analysis" check. |
Signed-off-by: cui fliter <imcusg@gmail.com>
solved, thanks |
|
nit: please change commit msg to |
|
I think this is ok to merge because it's a best practice. In terms of performance it might only matter in id.go and trace.go. This covers all occurrences except for tests. cc @serathius @ahrtr |
Done. Thanks |
strings.Builder uses *(*string)(unsafe.Pointer(&b.buf)) to save the application memory operation when converting to a string
Updates #15910