mirror of
https://github.com/containers/skopeo.git
synced 2025-09-29 05:56:22 +00:00
support cert-path and tls-verify flags
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
This commit is contained in:
8
utils.go
8
utils.go
@@ -10,10 +10,14 @@ import (
|
||||
|
||||
// ParseImage converts image URL-like string to an initialized handler for that image.
|
||||
func ParseImage(c *cli.Context) (types.Image, error) {
|
||||
imgName := c.Args().First()
|
||||
var (
|
||||
imgName = c.Args().First()
|
||||
certPath = c.GlobalString("cert-path")
|
||||
tlsVerify = c.GlobalBool("tls-verify")
|
||||
)
|
||||
switch {
|
||||
case strings.HasPrefix(imgName, types.DockerPrefix):
|
||||
return parseDockerImage(strings.TrimPrefix(imgName, types.DockerPrefix))
|
||||
return parseDockerImage(strings.TrimPrefix(imgName, types.DockerPrefix), certPath, tlsVerify)
|
||||
//case strings.HasPrefix(img, appcPrefix):
|
||||
//
|
||||
}
|
||||
|
Reference in New Issue
Block a user