Skip to content

Commit

Permalink
'library' namespace is implied in tags list (#134)
Browse files Browse the repository at this point in the history
  • Loading branch information
felicianotech committed Feb 13, 2022
1 parent 06ccf8e commit 27c9e06
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions sonar/docker/tag.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package docker

import (
"encoding/json"
"errors"
"net/http"
"time"
)
Expand All @@ -13,11 +14,18 @@ type Tag struct {
Digest string
}

func GetAllTags(image string) ([]Tag, error) {
func GetAllTags(imageStr string) ([]Tag, error) {

var results []Tag
var image *ImageRef

reqURL := "https://hub.docker.com/v2/repositories/" + image + "/tags/?page_size=100"
image, err := ParseImageRef(imageStr)
if err != nil {
return nil, errors.New("Image name not parsable.")
}
image.ShowTag = false

reqURL := "https://hub.docker.com/v2/repositories/" + image.String() + "/tags/?page_size=100"

for {

Expand Down

0 comments on commit 27c9e06

Please sign in to comment.