presenter: provide ID_LIKE information in json

Signed-off-by: Alfredo Deza <adeza@anchore.com>
This commit is contained in:
Alfredo Deza 2020-11-10 12:40:17 -05:00
parent 64d5554144
commit 10b55311df

View File

@ -16,6 +16,7 @@ type Document struct {
type Distribution struct {
Name string `json:"name"`
Version string `json:"version"`
IDLike string `json:"idLike"`
}
func NewDocument(catalog *pkg.Catalog, s scope.Scope, d distro.Distro) (Document, error) {
@ -35,6 +36,7 @@ func NewDocument(catalog *pkg.Catalog, s scope.Scope, d distro.Distro) (Document
doc.Distro = Distribution{
Name: distroName,
Version: d.FullVersion(),
IDLike: d.IDLike,
}
for _, p := range catalog.Sorted() {