-
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.
make PackageURL.String() use a value receiver rather than pointer rec…
…eiver This makes fmt.Sprintf("%s", packageurl.FromString("pkg:maven/org.yaml/snakeyaml@1.24")) output the expected "pkg:maven/org.yaml/snakeyaml@1.24" rather than "{maven org.yaml snakeyaml 1.24 }" As it stands with String() as a pointer receiver one needs to: purl := packageurl.FromString("pkg:maven/org.yaml/snakeyaml@1.24") fmt.Sprintf("%s", &purl) to get the intended output.
- Loading branch information
1 parent
04e124e
commit 0789fa5
Showing
2 changed files
with
12 additions
and
4 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