fix use-errors-new from revive

Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
This commit is contained in:
Matthieu MOREL
2025-05-15 11:56:40 +02:00
parent f0136d1dba
commit 381d9d0723
107 changed files with 267 additions and 235 deletions

View File

@@ -3,6 +3,7 @@ package main
import (
"bufio"
"context"
"errors"
"fmt"
"io"
"os/exec"
@@ -136,7 +137,7 @@ func (s *DockerCLIAttachSuite) TestAttachTTYWithoutStdin(c *testing.T) {
Stdout: cmd.Stdout,
})
if result.Error == nil {
done <- fmt.Errorf("attach should have failed")
done <- errors.New("attach should have failed")
return
} else if !strings.Contains(result.Combined(), expected) {
done <- fmt.Errorf("attach failed with error %q: expected %q", out, expected)