(input string)
| 24 | } |
| 25 | |
| 26 | func ParseInputImageReference(input string) InputImageReference { |
| 27 | if strings.HasPrefix(input, "oci:") { |
| 28 | imageNameParsed := strings.SplitN(input, ":", 2) |
| 29 | return &layoutInputImageReference{ |
| 30 | name: imageNameParsed[1], |
| 31 | } |
| 32 | } |
| 33 | return &defaultInputImageReference{ |
| 34 | name: input, |
| 35 | } |
| 36 | } |
| 37 | |
| 38 | func (d *defaultInputImageReference) Name() string { |
| 39 | return d.name |
no outgoing calls