diff options
| author | Dmitri Shuralyov <dmitshur@golang.org> | 2023-10-01 14:25:52 -0400 |
|---|---|---|
| committer | Gopher Robot <gobot@golang.org> | 2023-10-02 13:50:15 +0000 |
| commit | f951e778cd57702302a4e97251e4fc67a98fd3ec (patch) | |
| tree | 100eed87b0381c3ace8d395c2377d2760cb93a8c /git-codereview/gofmt.go | |
| parent | dbef367af75863876323ec31693d7cd0d65d5f9e (diff) | |
| download | go-x-review-f951e778cd57702302a4e97251e4fc67a98fd3ec.tar.xz | |
git-codereview: use strings.Cutv1.7.0
Basic cut functionality is available in the standard library as of
Go 1.18, so today's supported Go versions (1.21 & 1.20) can use it.
Also simplify some slice and map code while here.
Change-Id: Ie887fc2dad542cd9a830974cf9c8373baa81ad8b
Reviewed-on: https://go-review.googlesource.com/c/review/+/531955
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Carlos Amedee <carlos@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Auto-Submit: Dmitri Shuralyov <dmitshur@golang.org>
Diffstat (limited to 'git-codereview/gofmt.go')
| -rw-r--r-- | git-codereview/gofmt.go | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/git-codereview/gofmt.go b/git-codereview/gofmt.go index ca5f798..1df3e43 100644 --- a/git-codereview/gofmt.go +++ b/git-codereview/gofmt.go @@ -253,9 +253,7 @@ func runGofmt(flags int) (files []string, stderrText string) { } } if flags&gofmtCommand != 0 { - for _, file := range localFiles { - args = append(args, file) - } + args = append(args, localFiles...) } if *verbose > 1 { |
