-
Notifications
You must be signed in to change notification settings - Fork 46
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Modify from_string for golang purls (#115)
* Modify from_string for golang purls Signed-off-by: Tushar Goel <[email protected]> * Fix failing tests Signed-off-by: Tushar Goel <[email protected]> * Address review comments Signed-off-by: Tushar Goel <[email protected]> --------- Signed-off-by: Tushar Goel <[email protected]> Co-authored-by: tdruez <[email protected]>
- Loading branch information
Showing
4 changed files
with
41 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,8 +28,8 @@ | |
"purl": "pkg:GOLANG/google.golang.org/genproto#/googleapis/api/annotations/", | ||
"canonical_purl": "pkg:golang/google.golang.org/genproto#googleapis/api/annotations", | ||
"type": "golang", | ||
"namespace": "google.golang.org", | ||
"name": "genproto", | ||
"namespace": null, | ||
"name": "google.golang.org/genproto", | ||
"version": null, | ||
"qualifiers": null, | ||
"subpath": "googleapis/api/annotations", | ||
|
@@ -40,13 +40,25 @@ | |
"purl": "pkg:GOLANG/google.golang.org/genproto@abcdedf#/googleapis/api/annotations/", | ||
"canonical_purl": "pkg:golang/google.golang.org/genproto@abcdedf#googleapis/api/annotations", | ||
"type": "golang", | ||
"namespace": "google.golang.org", | ||
"name": "genproto", | ||
"namespace": null, | ||
"name": "google.golang.org/genproto", | ||
"version": "abcdedf", | ||
"qualifiers": null, | ||
"subpath": "googleapis/api/annotations", | ||
"is_invalid": false | ||
}, | ||
{ | ||
"description": "valid golang purl", | ||
"purl": "pkg:golang/github.com/nats-io/nats-server/v2/[email protected]", | ||
"canonical_purl": "pkg:golang/github.com/nats-io/nats-server/v2/[email protected]", | ||
"type": "golang", | ||
"namespace": null, | ||
"name": "github.com/nats-io/nats-server/v2/server", | ||
"version": "v1.2.9", | ||
"qualifiers": null, | ||
"subpath": null, | ||
"is_invalid": false | ||
}, | ||
{ | ||
"description": "bitbucket namespace and name should be lowercased", | ||
"purl": "pkg:bitbucket/birKenfeld/pyGments-main@244fd47e07d1014f0aed9c", | ||
|
@@ -346,5 +358,17 @@ | |
"qualifiers": null, | ||
"subpath": "googleapis/api/annotations", | ||
"is_invalid": false | ||
}, | ||
{ | ||
"description": "valid npm purl without namespace, version and subpath", | ||
"purl": "pkg:NPM/core#/googleapis/api/annotations/", | ||
"canonical_purl": "pkg:npm/core#googleapis/api/annotations", | ||
"type": "npm", | ||
"namespace": null, | ||
"name": "core", | ||
"version": null, | ||
"qualifiers": null, | ||
"subpath": "googleapis/api/annotations", | ||
"is_invalid": false | ||
} | ||
] |