mirror of
https://github.com/anchore/syft.git
synced 2025-11-18 00:43:20 +01:00
do not include optional fields
Signed-off-by: Alex Goodman <alex.goodman@anchore.com>
This commit is contained in:
parent
8bcba7d830
commit
62f6146c37
@ -5,9 +5,9 @@ import "github.com/package-url/packageurl-go"
|
|||||||
// JavaMetadata encapsulates all Java ecosystem metadata for a package as well as an (optional) parent relationship.
|
// JavaMetadata encapsulates all Java ecosystem metadata for a package as well as an (optional) parent relationship.
|
||||||
type JavaMetadata struct {
|
type JavaMetadata struct {
|
||||||
VirtualPath string `json:"virtualPath"`
|
VirtualPath string `json:"virtualPath"`
|
||||||
Manifest *JavaManifest `mapstructure:"Manifest" json:"manifest"`
|
Manifest *JavaManifest `mapstructure:"Manifest" json:"manifest,omitempty"`
|
||||||
PomProperties *PomProperties `mapstructure:"PomProperties" json:"pomProperties"`
|
PomProperties *PomProperties `mapstructure:"PomProperties" json:"pomProperties,omitempty"`
|
||||||
Parent *Package `json:"parentPackage"` // TODO: should this be included in the json output?
|
Parent *Package `json:"parentPackage,omitempty"` // TODO: should this be included in the json output?
|
||||||
}
|
}
|
||||||
|
|
||||||
// PomProperties represents the fields of interest extracted from a Java archive's pom.xml file.
|
// PomProperties represents the fields of interest extracted from a Java archive's pom.xml file.
|
||||||
@ -31,6 +31,7 @@ type JavaManifest struct {
|
|||||||
ImplVersion string `mapstructure:"Implementation-Version" json:"implementationVersion"`
|
ImplVersion string `mapstructure:"Implementation-Version" json:"implementationVersion"`
|
||||||
ImplVendor string `mapstructure:"Implementation-Vendor" json:"implementationVendor"`
|
ImplVendor string `mapstructure:"Implementation-Vendor" json:"implementationVendor"`
|
||||||
Extra map[string]string `mapstructure:",remain" json:"extraFields"`
|
Extra map[string]string `mapstructure:",remain" json:"extraFields"`
|
||||||
|
Sections []map[string]string `json:"sections"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func (m JavaMetadata) PackageURL() string {
|
func (m JavaMetadata) PackageURL() string {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user