refactor todos

Signed-off-by: Antonio Murdaca <runcom@redhat.com>
This commit is contained in:
Antonio Murdaca 2016-01-20 18:38:57 +01:00
parent f34af0b7aa
commit 6414760815

View File

@ -64,24 +64,18 @@ func inspect(c *cli.Context) (*imageInspect, error) {
if err != nil { if err != nil {
return nil, err return nil, err
} }
var (
ii *imageInspect
)
// TODO(runcom): remove docker.io case cause unqualified images // TODO(runcom): remove docker.io case cause unqualified images
// can be from additional registry below // can be from additional registry below
// tweak the ParseNamed above so I can know if its unqualified // tweak the ParseNamed above so I can know if its unqualified
if ref.Hostname() != "" { // EDIT(runcom): it's probably better to expose an additional registries REST
ii, err = getData(ref, authConfig) // route in projectatomic fork of docker and let the magic happen in projectatomic/docker
if err != nil { //if ref.Hostname() != "" {
return nil, err //}
} imgInspect, err := getData(ref, authConfig)
return ii, nil if err != nil {
return nil, err
} }
return imgInspect, nil
// TODO(runcom): ...
// both authConfig and unqualified images
return nil, nil
} }
func getData(ref reference.Named, authConfig types.AuthConfig) (*imageInspect, error) { func getData(ref reference.Named, authConfig types.AuthConfig) (*imageInspect, error) {
@ -221,7 +215,7 @@ func getAuthConfig(c *cli.Context, ref reference.Named) (types.AuthConfig, error
authConfig = types.AuthConfig{ authConfig = types.AuthConfig{
Username: username, Username: username,
Password: password, Password: password,
Email: "antonio.murdaca@gmail.com", Email: "stub@example.com",
} }
} }