From 008f6a2da3e175dc13f0845ba51bb0317a36806b Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Tue, 29 Oct 2019 12:15:01 +0100 Subject: [PATCH] cli/command: Error return value of `cli.Apply` is not checked (errcheck) ``` cli/command/cli_test.go:297:11: Error return value of `cli.Apply` is not checked (errcheck) cli.Apply( ^ ``` Signed-off-by: Sebastiaan van Stijn --- cli/command/cli_test.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cli/command/cli_test.go b/cli/command/cli_test.go index 34d0c219ca..a97702e15e 100644 --- a/cli/command/cli_test.go +++ b/cli/command/cli_test.go @@ -294,11 +294,12 @@ func TestNewDockerCliAndOperators(t *testing.T) { inbuf := bytes.NewBuffer([]byte("input")) outbuf := bytes.NewBuffer(nil) errbuf := bytes.NewBuffer(nil) - cli.Apply( + err = cli.Apply( WithInputStream(ioutil.NopCloser(inbuf)), WithOutputStream(outbuf), WithErrorStream(errbuf), ) + assert.NilError(t, err) // Check input stream inputStream, err := ioutil.ReadAll(cli.In()) assert.NilError(t, err)