1
0
mirror of https://github.com/golang/go synced 2024-11-07 12:26:16 -07:00
go/src/flag
James Fennell 27015152ec 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: 0e12fe3045
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>
2021-04-05 20:39:06 +00:00
..
example_func_test.go
example_test.go
example_value_test.go
export_test.go
flag_test.go flag: panic if flag name begins with - or contains = 2021-03-10 18:33:52 +00:00
flag.go flag: use strings.Builder instead of concatenating strings 2021-04-05 20:39:06 +00:00