mirror of
https://github.com/containers/skopeo.git
synced 2025-04-28 19:24:24 +00:00
19 lines
369 B
Go
19 lines
369 B
Go
package main
|
|
|
|
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")
|
|
}
|