Add own reference package wrapper

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: 2655954c2dd9d92c2394b04e4262543174c4c038
Component: engine
This commit is contained in:
Tonis Tiigi
2015-12-04 13:55:15 -08:00
parent 5fc03c3956
commit 020b74d545
44 changed files with 278 additions and 234 deletions

View File

@ -4,12 +4,12 @@ import (
"errors"
"io"
"github.com/docker/distribution/reference"
"github.com/docker/docker/api/client/lib"
"github.com/docker/docker/api/types"
Cli "github.com/docker/docker/cli"
"github.com/docker/docker/pkg/jsonmessage"
flag "github.com/docker/docker/pkg/mflag"
"github.com/docker/docker/reference"
"github.com/docker/docker/registry"
)
@ -30,9 +30,9 @@ func (cli *DockerCli) CmdPush(args ...string) error {
var tag string
switch x := ref.(type) {
case reference.Digested:
case reference.Canonical:
return errors.New("cannot push a digest reference")
case reference.Tagged:
case reference.NamedTagged:
tag = x.Tag()
}