Update import logic

Signed-off-by: Derek McGowan <derek@mcg.dev>
This commit is contained in:
Derek McGowan
2022-09-15 22:42:34 -07:00
parent 66dc4d1069
commit 11c1c8e6f4
7 changed files with 256 additions and 14 deletions

View File

@@ -41,6 +41,9 @@ func AddRefPrefix(image string) func(string) string {
// a full reference.
func refTranslator(image string, checkPrefix bool) func(string) string {
return func(ref string) string {
if image == "" {
return ""
}
// Check if ref is full reference
if strings.ContainsAny(ref, "/:@") {
// If not prefixed, don't include image