cli/command/image: remove errStdinConflict

This error was only used in a single location, so no need to define a
package-level variable for this.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
Sebastiaan van Stijn 2023-06-13 13:47:56 +02:00
parent 7d723e2ba7
commit 77dd05caad
No known key found for this signature in database
GPG Key ID: 76698F39D527CE8C
1 changed files with 1 additions and 3 deletions

View File

@ -34,8 +34,6 @@ import (
"github.com/spf13/cobra" "github.com/spf13/cobra"
) )
var errStdinConflict = errors.New("invalid argument: can't use stdin for both build context and dockerfile")
type buildOptions struct { type buildOptions struct {
context string context string
dockerfileName string dockerfileName string
@ -189,7 +187,7 @@ func runBuild(dockerCli command.Cli, options buildOptions) error {
if options.dockerfileFromStdin() { if options.dockerfileFromStdin() {
if options.contextFromStdin() { if options.contextFromStdin() {
return errStdinConflict return errors.New("invalid argument: can't use stdin for both build context and dockerfile")
} }
dockerfileCtx = dockerCli.In() dockerfileCtx = dockerCli.In()
} }