mirror of
https://github.com/anchore/syft.git
synced 2025-11-17 16:33:21 +01:00
use zero value for nils in ID generation
Signed-off-by: Alex Goodman <alex.goodman@anchore.com>
This commit is contained in:
parent
1537e73083
commit
2356539ebe
@ -1,7 +1,7 @@
|
||||
{
|
||||
"artifacts": [
|
||||
{
|
||||
"id": "810333194629225077",
|
||||
"id": "14696638697550896878",
|
||||
"name": "package-1",
|
||||
"version": "1.0.1",
|
||||
"type": "python",
|
||||
|
||||
@ -19,7 +19,6 @@ type Package struct {
|
||||
Version string // the version of the package
|
||||
FoundBy string // the specific cataloger that discovered this package
|
||||
Locations []source.Location // the locations that lead to the discovery of this package (note: this is not necessarily the locations that make up this package)
|
||||
// TODO: should we move licenses into metadata?
|
||||
Licenses []string // licenses discovered with the package metadata
|
||||
Language Language // the language ecosystem this package belongs to (e.g. JavaScript, Python, etc)
|
||||
Type Type // the package type (e.g. Npm, Yarn, Python, Rpm, Deb, etc)
|
||||
@ -47,7 +46,7 @@ func (p Package) String() string {
|
||||
|
||||
func (p Package) Fingerprint() (string, error) {
|
||||
f, err := hashstructure.Hash(p, hashstructure.FormatV2, &hashstructure.HashOptions{
|
||||
//ZeroNil: true,
|
||||
ZeroNil: true,
|
||||
SlicesAsSets: true,
|
||||
})
|
||||
if err != nil {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user