Skip to content
This repository was archived by the owner on Feb 24, 2024. It is now read-only.

Commit 6ee2971

Browse files
committed
make users/imageName searchable
1 parent 8a84d2b commit 6ee2971

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

cmd/root.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ func NewCmdRoot() *cobra.Command {
5757

5858
cmd.Printf("Searching %s tags...\n", boldText(imageName))
5959

60-
url := fmt.Sprintf("https://registry.hub.docker.com/v2/repositories/library/%s/tags/?page_size=10000", imageName)
60+
url := fmt.Sprintf("https://registry.hub.docker.com/v2/repositories/%s/tags/?page_size=10000", imageName)
6161

6262
resp, err := http.Get(url)
6363
if err != nil {
@@ -174,6 +174,10 @@ func imagePrompt() (string, error) {
174174
return "", err
175175
}
176176

177+
if !strings.Contains(imageName, "/") {
178+
imageName = "library/" + imageName
179+
}
180+
177181
return imageName, nil
178182
}
179183

0 commit comments

Comments
 (0)