Replace fmt.Errorf() with errors.Errorf() in the cli

Signed-off-by: Daniel Nephin <dnephin@docker.com>
This commit is contained in:
Daniel Nephin
2017-03-09 13:23:45 -05:00
parent c1b2fad9aa
commit e9d6193dfd
99 changed files with 370 additions and 337 deletions
+2 -2
View File
@@ -1,7 +1,6 @@
package image
import (
"fmt"
"io"
"golang.org/x/net/context"
@@ -10,6 +9,7 @@ import (
"github.com/docker/docker/cli/command"
"github.com/docker/docker/pkg/jsonmessage"
"github.com/docker/docker/pkg/system"
"github.com/pkg/errors"
"github.com/spf13/cobra"
)
@@ -56,7 +56,7 @@ func runLoad(dockerCli *command.DockerCli, opts loadOptions) error {
// To avoid getting stuck, verify that a tar file is given either in
// the input flag or through stdin and if not display an error message and exit.
if opts.input == "" && dockerCli.In().IsTerminal() {
return fmt.Errorf("requested load from stdin, but stdin is empty")
return errors.Errorf("requested load from stdin, but stdin is empty")
}
if !dockerCli.Out().IsTerminal() {