Skip to content

Commit bc02802

Browse files
committed
feat: add default registry for image URLs in GetRegistry function
1 parent 07a640b commit bc02802

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

structs/image.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,10 @@ func (i *Image) GetRegistry(url string) string {
3131
return strings.Join(fields[:2], "/")
3232
}
3333

34+
if len(fields) == 2 {
35+
return "docker.io"
36+
}
37+
3438
return fields[0]
3539
}
3640

0 commit comments

Comments
 (0)