mirror of
https://github.com/anchore/syft.git
synced 2025-11-18 00:43:20 +01:00
presenter: provide ID_LIKE information in json
Signed-off-by: Alfredo Deza <adeza@anchore.com>
This commit is contained in:
parent
64d5554144
commit
10b55311df
@ -16,6 +16,7 @@ type Document struct {
|
|||||||
type Distribution struct {
|
type Distribution struct {
|
||||||
Name string `json:"name"`
|
Name string `json:"name"`
|
||||||
Version string `json:"version"`
|
Version string `json:"version"`
|
||||||
|
IDLike string `json:"idLike"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func NewDocument(catalog *pkg.Catalog, s scope.Scope, d distro.Distro) (Document, error) {
|
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{
|
doc.Distro = Distribution{
|
||||||
Name: distroName,
|
Name: distroName,
|
||||||
Version: d.FullVersion(),
|
Version: d.FullVersion(),
|
||||||
|
IDLike: d.IDLike,
|
||||||
}
|
}
|
||||||
|
|
||||||
for _, p := range catalog.Sorted() {
|
for _, p := range catalog.Sorted() {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user