
Security News
New CVE Forecasting Tool Predicts 47,000 Disclosures in 2025
CVEForecast.org uses machine learning to project a record-breaking surge in vulnerability disclosures in 2025.
github.com/scribe-security/packageurl-go
Go implementation of the package url spec.
go get -u github.com/package-url/packageurl-go
The versions will follow the spec. So if the spec is released at 1.0
. Then all versions in the 1.x.y
will follow the 1.x
spec.
package main
import (
"fmt"
"github.com/package-url/packageurl-go"
)
func main() {
instance := packageurl.NewPackageURL("test", "ok", "name", "version", nil, "")
fmt.Printf("%s", instance.ToString())
}
package main
import (
"fmt"
"github.com/package-url/packageurl-go"
)
func main() {
instance, err := packageurl.FromString("test:ok/name@version")
if err != nil {
panic(err)
}
fmt.Printf("%#v", instance)
}
Testing using the normal go test
command. Using make test
will pull the test fixtures shared between all package-url projects and then execute the tests.
$ make test
curl -L https://raw.githubusercontent.com/package-url/purl-test-suite/master/test-suite-data.json -o testdata/test-suite-data.json
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 7181 100 7181 0 0 1202 0 0:00:05 0:00:05 --:--:-- 1611
go test -v -cover ./...
=== RUN TestFromStringExamples
--- PASS: TestFromStringExamples (0.00s)
=== RUN TestToStringExamples
--- PASS: TestToStringExamples (0.00s)
PASS
coverage: 94.7% of statements
ok github.com/package-url/packageurl-go 0.002s
FAQs
Unknown package
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
CVEForecast.org uses machine learning to project a record-breaking surge in vulnerability disclosures in 2025.
Security News
Browserslist-rs now uses static data to reduce binary size by over 1MB, improving memory use and performance for Rust-based frontend tools.
Research
Security News
Eight new malicious Firefox extensions impersonate games, steal OAuth tokens, hijack sessions, and exploit browser permissions to spy on users.