mirror of
https://github.com/moby/moby.git
synced 2026-01-11 18:51:37 +00:00
fix use-errors-new from revive
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user