Skip to content

Conversation

@samherrmann
Copy link

The PURL specification states that qualifiers are to be sorted lexicographically:

https://github.com/package-url/purl-spec/blob/0c3bc118ac5c001e067ba42fba8501405514f1a9/purl-specification.md?plain=1#L458

@samherrmann samherrmann requested a review from a team as a code owner November 28, 2025 22:58
"golang.org/x/exp/slices"
"golang.org/x/mod/semver"
"golang.org/x/mod/sumdb/dirhash"

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These imports must have been sorted by gofmt

@nscuro nscuro added the enhancement New feature or request label Dec 1, 2025
})

return fmt.Sprintf("pkg:golang/%s?type=module&goos=%s&goarch=%s", m.Coordinates(), envMap["GOOS"], envMap["GOARCH"])
return fmt.Sprintf("pkg:golang/%s?goarch=%s&goos=%s&type=module", m.Coordinates(), envMap["GOARCH"], envMap["GOOS"])
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The previous order of qualifiers was not compliant with the package URL spec since the qualifiers were not sorted lexicographically.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants