mirror of
https://github.com/containers/skopeo.git
synced 2025-05-07 23:46:46 +00:00
19 lines
371 B
Go
19 lines
371 B
Go
package skopeo
|
|
|
|
import (
|
|
"fmt"
|
|
"strings"
|
|
|
|
"github.com/projectatomic/skopeo/types"
|
|
)
|
|
|
|
func ParseImage(img string) (types.Image, error) {
|
|
switch {
|
|
case strings.HasPrefix(img, types.DockerPrefix):
|
|
return parseDockerImage(strings.TrimPrefix(img, dockerPrefix))
|
|
//case strings.HasPrefix(img, appcPrefix):
|
|
//
|
|
}
|
|
return nil, fmt.Errorf("no valid prefix provided")
|
|
}
|