]> Cypherpunks.ru repositories - gostls13.git/commit
flag: use strings.Builder instead of concatenating strings
authorJames Fennell <jpfennell@google.com>
Mon, 5 Apr 2021 18:21:59 +0000 (18:21 +0000)
committerIan Lance Taylor <iant@golang.org>
Mon, 5 Apr 2021 20:39:06 +0000 (20:39 +0000)
commit27015152ec769aeed2ab92533772b97c0ef96b11
tree47f6b0d51a4555611fd08e941ab6ad2e70ca8ad4
parentee40bb666bed55e7232c50a980e238aed7a32e0c
flag: use strings.Builder instead of concatenating strings

There is a single function in the flag package whose implementation
uses string concatenation instead of the recommended strings.Builder.
The function was last touched before strings.Builder was introduced
in Go 1.10, which explains the old style code. This PR updates
the implementation.

Fixes #45392

Change-Id: Id2d8f1788765a0c4faaeb1e6870914f72b3c8442
GitHub-Last-Rev: 0e12fe304593afc627fc4f1597670efd354809b0
GitHub-Pull-Request: golang/go#45393
Reviewed-on: https://go-review.googlesource.com/c/go/+/307329
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Trust: Josh Bleecher Snyder <josharian@gmail.com>
src/flag/flag.go