1
0
mirror of https://github.com/golang/go synced 2024-11-07 12:36:27 -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 flag: add Func 2020-09-16 17:13:14 +00:00
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