From f8b4653500744da567767b641378193638d4fcf8 Mon Sep 17 00:00:00 2001 From: Alan Donovan Date: Wed, 14 Feb 2024 17:17:40 -0500 Subject: 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 Reviewed-by: Michael Pratt LUCI-TryBot-Result: Go LUCI --- src/os/exec/exec_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/os/exec/exec_test.go') 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) } }) -- cgit v1.3-5-g9baa