Skip to content

Commit

Permalink
Fix library images and last_pushed (#149)
Browse files Browse the repository at this point in the history
  • Loading branch information
FelicianoTech authored Sep 7, 2022
1 parent 1f6f4f8 commit 649a273
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion sonar/docker/tag.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,13 @@ func GetAllTags(imageStr string) ([]Tag, error) {

var aTag Tag

// only parse time when present
if v.(map[string]interface{})["tag_last_pushed"] != nil {
aTag.LastPushed, _ = time.Parse(time.RFC3339, v.(map[string]interface{})["tag_last_pushed"].(string))
}

aTag.Name = v.(map[string]interface{})["name"].(string)
aTag.Size = int64(v.(map[string]interface{})["full_size"].(float64))
aTag.LastPushed, err = time.Parse(time.RFC3339, v.(map[string]interface{})["tag_last_pushed"].(string))
aTag.Date = aTag.LastPushed
if err != nil {
return nil, err
Expand Down

0 comments on commit 649a273

Please sign in to comment.