mirror of
https://github.com/containers/skopeo.git
synced 2025-08-02 07:17:46 +00:00
refactor todos
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
This commit is contained in:
parent
f34af0b7aa
commit
6414760815
24
inspect.go
24
inspect.go
@ -64,24 +64,18 @@ func inspect(c *cli.Context) (*imageInspect, error) {
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
var (
|
||||
ii *imageInspect
|
||||
)
|
||||
// TODO(runcom): remove docker.io case cause unqualified images
|
||||
// can be from additional registry below
|
||||
// tweak the ParseNamed above so I can know if its unqualified
|
||||
if ref.Hostname() != "" {
|
||||
ii, err = getData(ref, authConfig)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return ii, nil
|
||||
// EDIT(runcom): it's probably better to expose an additional registries REST
|
||||
// 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 {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
// TODO(runcom): ...
|
||||
// both authConfig and unqualified images
|
||||
|
||||
return nil, nil
|
||||
return imgInspect, nil
|
||||
}
|
||||
|
||||
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{
|
||||
Username: username,
|
||||
Password: password,
|
||||
Email: "antonio.murdaca@gmail.com",
|
||||
Email: "stub@example.com",
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user