aboutsummaryrefslogtreecommitdiff
path: root/git-codereview/submit_test.go
diff options
context:
space:
mode:
authorDmitri Shuralyov <dmitshur@golang.org>2023-10-01 14:25:52 -0400
committerGopher Robot <gobot@golang.org>2023-10-02 13:50:15 +0000
commitf951e778cd57702302a4e97251e4fc67a98fd3ec (patch)
tree100eed87b0381c3ace8d395c2377d2760cb93a8c /git-codereview/submit_test.go
parentdbef367af75863876323ec31693d7cd0d65d5f9e (diff)
downloadgo-x-review-1.7.0.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/submit_test.go')
-rw-r--r--git-codereview/submit_test.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/git-codereview/submit_test.go b/git-codereview/submit_test.go
index 29f9c02..3e18fd8 100644
--- a/git-codereview/submit_test.go
+++ b/git-codereview/submit_test.go
@@ -250,12 +250,12 @@ func testSubmitMultiple(t *testing.T, gt *gitTest, srv *gerritServer) (*GerritCh
cl1 := GerritChange{
Status: "NEW",
CurrentRevision: hash1,
- Labels: map[string]*GerritLabel{"Code-Review": &GerritLabel{Approved: new(GerritAccount)}},
+ Labels: map[string]*GerritLabel{"Code-Review": {Approved: new(GerritAccount)}},
}
cl2 := GerritChange{
Status: "NEW",
CurrentRevision: hash2,
- Labels: map[string]*GerritLabel{"Code-Review": &GerritLabel{Approved: new(GerritAccount)}},
+ Labels: map[string]*GerritLabel{"Code-Review": {Approved: new(GerritAccount)}},
}
srv.setReply("/a/changes/proj~main~I0000001", gerritReply{f: func() gerritReply {