-
Notifications
You must be signed in to change notification settings - Fork 579
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement golang Purl subpath (#2547)
* Added test for golang package that include subpath into the module Signed-off-by: Laurent Goderre <[email protected]> * Implement golang purl subpath Signed-off-by: Laurent Goderre <[email protected]> --------- Signed-off-by: Laurent Goderre <[email protected]>
- Loading branch information
1 parent
414fb2f
commit d7c51e5
Showing
3 changed files
with
32 additions
and
13 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -31,6 +31,21 @@ func Test_packageURL(t *testing.T) { | |
}, | ||
expected: "pkg:golang/[email protected]", | ||
}, | ||
{ | ||
name: "golang with subpath", | ||
pkg: pkg.Package{ | ||
Name: "github.com/coreos/go-systemd/v22", | ||
Version: "v22.1.0", | ||
}, | ||
expected: "pkg:golang/github.com/coreos/[email protected]#v22", | ||
}, | ||
{ | ||
name: "golang with subpath deep", | ||
pkg: pkg.Package{ | ||
Name: "google.golang.org/genproto/googleapis/api/annotations", | ||
}, | ||
expected: "pkg:golang/google.golang.org/genproto/googleapis#api/annotations", | ||
}, | ||
} | ||
|
||
for _, test := range tests { | ||
|
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