Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add new spec for go package URLs #357

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions PURL-TYPES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -297,6 +297,27 @@ github
pkg:github/package-url/purl-spec@244fd47e07d1004
pkg:github/package-url/purl-spec@244fd47e07d1004#everybody/loves/dogs

go
------
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
------
-------------

⬆️ this is a demo how a change suggesttion looks like; it is not meant to be applied
the exact "code" i used:

```suggestion
-------------
```

``go`` for Go modules:

- The ``namespace`` is empty.
- The ``name`` is the unmodified full case-sensitive [Go module path](https://go.dev/ref/mod#module-path).
For artifacts in the Go standard library or the Go command, the ``name`` is `stdlib`.
- The ``subpath`` is the unmodified Go package path within a module.
- The ``version`` may be a valid [Go version](https://go.dev/doc/toolchain#version) for `stdlib`,
[Go module version](https://go.dev/doc/modules/version-numbers), [`(devel)`](https://go.dev/ref/mod#go-version-m),
or omitted when empty.
- The ``qualifiers`` are URL encoded key-value pairs as defined by
Go's [`debug.BuildSetting`](https://pkg.go.dev/runtime/debug#BuildSetting).
This list can be extended in the future.
- Examples::

pkg:go/google.golang.org%2Fgenproto#googleapis/api/annotations
pkg:go/github.com%2Fjmorion%[email protected]#api
pkg:go/golang.org%2Fx%2Fvuln?goversion=1.23.2&vcs=git&vcs.modified=true#cmd/govulncheck
pkg:go/golang.org%2Fx%[email protected]?goos=linux#cmd/govulncheck

golang
------
``golang`` for Go packages:
Expand Down