From 406355a4df8af4b140e43c56c0c4c9869471edca Mon Sep 17 00:00:00 2001 From: Dmitri Shuralyov Date: Tue, 10 Oct 2023 19:19:10 -0400 Subject: all: update go directive to 1.18 Done with: go get go@1.18 go mod tidy go fix ./... Using go1.21.3. While here, use testing.T.Helper directly and delete go19_test.go. For golang/go#60268. Change-Id: I924bb6d107180a04d1f879003b169c7f792d8dd4 Reviewed-on: https://go-review.googlesource.com/c/review/+/534198 Reviewed-by: Dmitri Shuralyov LUCI-TryBot-Result: Go LUCI Reviewed-by: Ian Lance Taylor Auto-Submit: Dmitri Shuralyov --- git-codereview/go19_test.go | 14 -------------- git-codereview/pending_test.go | 7 ++----- go.mod | 2 +- 3 files changed, 3 insertions(+), 20 deletions(-) delete mode 100644 git-codereview/go19_test.go diff --git a/git-codereview/go19_test.go b/git-codereview/go19_test.go deleted file mode 100644 index 999769d..0000000 --- a/git-codereview/go19_test.go +++ /dev/null @@ -1,14 +0,0 @@ -// Copyright 2017 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -//go:build go1.9 -// +build go1.9 - -package main - -import "testing" - -func init() { - setHelper = (*testing.T).Helper -} diff --git a/git-codereview/pending_test.go b/git-codereview/pending_test.go index d46c1d8..1823439 100644 --- a/git-codereview/pending_test.go +++ b/git-codereview/pending_test.go @@ -14,9 +14,6 @@ import ( "testing" ) -// setHelper calls t.Helper() for Go 1.9+ (see go19_test.go) and does nothing otherwise. -var setHelper = func(t *testing.T) {} - func TestPendingNone(t *testing.T) { gt := newGitTest(t) defer gt.done() @@ -470,12 +467,12 @@ func testPendingReply(srv *gerritServer, id, rev, status string, unresolved int) } func testPending(t *testing.T, want string) { - setHelper(t) + t.Helper() testPendingArgs(t, nil, want) } func testPendingArgs(t *testing.T, args []string, want string) { - setHelper(t) + t.Helper() // fake auth information to avoid Gerrit error if !auth.initialized { auth.initialized = true diff --git a/go.mod b/go.mod index e3509ac..5a82dfc 100644 --- a/go.mod +++ b/go.mod @@ -1,3 +1,3 @@ module golang.org/x/review -go 1.13 +go 1.18 -- cgit v1.3