aboutsummaryrefslogtreecommitdiff
path: root/src/os/exec/exec_test.go
diff options
context:
space:
mode:
authorAlan Donovan <adonovan@google.com>2024-02-14 17:17:40 -0500
committerAlan Donovan <adonovan@google.com>2024-02-26 22:01:11 +0000
commitf8b4653500744da567767b641378193638d4fcf8 (patch)
tree5a356e59dcc03bfb87da429d58495d515095b487 /src/os/exec/exec_test.go
parent0fefe417db0e4343968e5772336289e1c82b88a4 (diff)
downloadgo-f8b4653500744da567767b641378193638d4fcf8.tar.xz
std: fix more nilness findings
(found with x/tools/go/analysis/passes/nilness) Change-Id: I1bdc7811efbecea95608e634f894cb6c656e3a5b Reviewed-on: https://go-review.googlesource.com/c/go/+/564221 Reviewed-by: Robert Griesemer <gri@google.com> Reviewed-by: Michael Pratt <mpratt@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Diffstat (limited to 'src/os/exec/exec_test.go')
-rw-r--r--src/os/exec/exec_test.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/os/exec/exec_test.go b/src/os/exec/exec_test.go
index 71a00494ad..0f9c71ab57 100644
--- a/src/os/exec/exec_test.go
+++ b/src/os/exec/exec_test.go
@@ -1659,8 +1659,8 @@ func TestCancelErrors(t *testing.T) {
// This test should kill the child process after 1ms,
// To maximize compatibility with existing uses of exec.CommandContext, the
// resulting error should be an exec.ExitError without additional wrapping.
- if ee, ok := err.(*exec.ExitError); !ok {
- t.Errorf("Wait error = %v; want %T", err, *ee)
+ if _, ok := err.(*exec.ExitError); !ok {
+ t.Errorf("Wait error = %v; want *exec.ExitError", err)
}
})