• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

package-url / packageurl-go
86%
master: 82%

Build:
Build:
LAST BUILD BRANCH: fix-failing-tests
DEFAULT BRANCH: master
Repo Added 03 Feb 2022 08:52PM UTC
Token lPrYSAsCXgNBQsjyjAanQJA4Y9P5OZybm regen
Build 60 Last
Files 1
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

LAST BUILD ON BRANCH escape
branch: escape
CHANGE BRANCH
x
Reset
Sync Branches
  • escape
  • 59-add-knowntypes
  • TestSuiteData
  • add-pub-bitnami-types
  • benji.visser/remove-deprecated-ioutil-usage
  • dot-slash-valid-subpath-prefix
  • feat/add-missing-purl-types-20230403
  • fix-ci
  • fix-failing-cpan-unit-test
  • fix-failing-tests
  • fix_tests
  • fuzz
  • go-mod-version
  • julia
  • known-cpan
  • license_link
  • main
  • master
  • normalize
  • npm-case-sensitive
  • patch-1
  • qualifiers
  • refs/tags/v0.1.1
  • refs/tags/v0.1.2
  • upstream_test_data

18 Jul 2023 03:01PM UTC coverage: 85.833% (+0.8%) from 85.022%
5589112670

Pull #58

github

tommyknows
fix: escape everything with modified QueryEscape

This commit switches to using `QueryEscape` for escaping all components.
However, because `QueryEscape` escapes ` ` (space) to `+`, we actually
change that to a `%20`, that is the percent-encoded equivalent.

`QueryEscape` was built for HTTP Query parameters, and although there is
[some discussion](https://stackoverflow.com/questions/2678551/when-should-space-be-encoded-to-plus-or-20)
around it, escaping ` ` to a `+` is completely valid.
Sadly, other languages like Javascript don't handle that properly, so if
we simply used `QueryEscape`, the purl couldn't be parsed by other
implementations.
By using the universally supported `%20` instead, we restore
compatibility.
Pull Request #58: fix: escape everything with modified QueryEscape

19 of 19 new or added lines in 1 file covered. (100.0%)

206 of 240 relevant lines covered (85.83%)

174.52 hits per line

Relevant lines Covered
Build:
Build:
240 RELEVANT LINES 206 COVERED LINES
174.52 HITS PER LINE
Source Files on escape
  • List 1
  • Changed 1
  • Source Changed 0
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line

Recent builds

Builds Branch Commit Type Ran Committer Via Coverage
5589112670 escape fix: escape everything with modified QueryEscape This commit switches to using `QueryEscape` for escaping all components. However, because `QueryEscape` escapes ` ` (space) to `+`, we actually change that to a `%20`, that is the percent-encoded e... Pull #58 18 Jul 2023 03:02PM UTC tommyknows github
85.83
See All Builds (60)

Badge your Repo: packageurl-go

We detected this repo isn’t badged! Grab the embed code to the right, add it to your repo to show off your code coverage, and when the badge is live hit the refresh button to remove this message.

Could not find badge in README.

Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

Refresh
  • Settings
  • Repo on GitHub
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc