mirror of
https://github.com/containers/skopeo.git
synced 2025-08-19 06:57:08 +00:00
refactor todos
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
This commit is contained in:
parent
f34af0b7aa
commit
6414760815
20
inspect.go
20
inspect.go
@ -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 ref.Hostname() != "" {
|
||||||
|
//}
|
||||||
|
imgInspect, err := getData(ref, authConfig)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
return ii, nil
|
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",
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user