• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In
You are now the owner of this repo.

dunglas / go-urlpattern
92%

Build:
DEFAULT BRANCH: main
Repo Added 15 Sep 2024 08:23PM UTC
Token yGjZrxkSLEYRXjo0G6xsg1Sx0WLJ4o8bQ regen
Build 48 Last
Files 6
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 main
branch: SELECT
CHANGE BRANCH
x
Sync Branches
  • No branch selected
  • chore/bump-deps
  • chore/lint-fixes
  • chore/upstream-whatwg-url
  • fix/canonicalize-hash-error
  • fix/process-hash-strip-prefix
  • fix/string-delimiters
  • fix/tokenizer-error-swallow
  • main
  • perf/duplicate-name-map
  • perf/scheme-lookups
  • spec/conformance
  • test/benchmarks

21 Apr 2026 02:14PM UTC coverage: 91.878% (+0.01%) from 91.865%
24727388304

push

github

web-flow
refactor!: rename error vars to ErrFoo and expand lint enforcement (#11)

* refactor!: rename exported error vars from FooError to ErrFoo

BREAKING CHANGE: every exported error identifier changes name to match
the staticcheck ST1012 convention that the Go standard library uses.
Consumers referencing these variables must update their imports:

  NoBaseURLError             -> ErrNoBaseURL
  UnexpectedEmptyStringError -> ErrUnexpectedEmptyString
  NonEmptySuffixError        -> ErrNonEmptySuffix
  BadParserIndexError        -> ErrBadParserIndex
  DuplicatePartNameError     -> ErrDuplicatePartName
  RequiredTokenError         -> ErrRequiredToken
  InvalidIPv6HostnameError   -> ErrInvalidIPv6Hostname
  InvalidPortError           -> ErrInvalidPort
  EmptyPartNameError         -> ErrEmptyPartName
  InvalidModifierError       -> ErrInvalidModifier
  InvalidPrefixOrSuffix      -> ErrInvalidPrefixOrSuffix
  InvalidPartNameError       -> ErrInvalidPartName
  TypeError                  -> ErrType

Also drops the ST1012 exclusion from .golangci.yml since the codebase
now satisfies it.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* chore: address remaining golangci-lint findings and enforce them

Expand the enabled linter set in .golangci.yml (err113, goconst,
gocritic, intrange, modernize, perfsprint, thelper, unconvert, unparam,
wastedassign, whitespace) and address every new finding:

- wastedassign: collapse ExecInit's 8 dead var = "" initializations and
  one in parser.go where regexpValue was assigned and immediately
  reassigned.
- gocritic (assignOp / ifElseChain / typeSwitchVar): use x += y, rewrite
  if-else chains to switch, switch on typed values.
- intrange: for range b.N in benchmarks, for i := range len(portValue)
  in the port prefix check; keep escape.go as-is (i needed after loop)
  with a //nolint rationale.
- modernize: replace interface{} with any in tests, use slices.Contains.
- perfsprint: fmt.Sprintf("%d", i) -> strc... (continued)

64 of 71 new or added lines in 6 files covered. (90.14%)

1482 of 1613 relevant lines covered (91.88%)

1132.0 hits per line

Relevant lines Covered
Build:
Build:
1613 RELEVANT LINES 1482 COVERED LINES
1132.0 HITS PER LINE
Source Files on main
  • Tree
  • List 6
  • Changed 3
  • Source Changed 0
  • Coverage Changed 3
Coverage ∆ File Lines Relevant Covered Missed Hits/Line

Recent builds

Builds Branch Commit Type Ran Committer Via Coverage
24727388304 main refactor!: rename error vars to ErrFoo and expand lint enforcement (#11) * refactor!: rename exported error vars from FooError to ErrFoo BREAKING CHANGE: every exported error identifier changes name to match the staticcheck ST1012 convention tha... push 21 Apr 2026 02:15PM UTC web-flow github
91.88
24678693572 chore/lint-fixes chore: address remaining golangci-lint findings and enforce them Expand the enabled linter set in .golangci.yml (err113, goconst, gocritic, intrange, modernize, perfsprint, thelper, unconvert, unparam, wastedassign, whitespace) and address every ... Pull #11 20 Apr 2026 04:43PM UTC dunglas github
91.88
24678639834 chore/lint-fixes chore: address remaining golangci-lint findings and enforce them Expand the enabled linter set in .golangci.yml (err113, goconst, gocritic, intrange, modernize, perfsprint, thelper, unconvert, unparam, wastedassign, whitespace) and address every ... push 20 Apr 2026 04:42PM UTC dunglas github
91.88
24677587846 main chore: bump deps, bump GitHub Actions, widen Go support matrix (#10) * chore: bump all deps and widen CI to both maintained Go versions - `go get -u all` + `go mod tidy`, bumping: - github.com/nlnwa/whatwg-url v0.5.0 -> v0.6.2 - github.com/b... push 20 Apr 2026 04:19PM UTC web-flow github
91.87
24677177775 chore/bump-deps docs: address review feedback on bump-deps - DefaultPorts godoc: spell out that mutating the exported map is only safe during package initialization / before concurrent use, since it is a plain Go map with no locking. - CI env comment: the go... Pull #10 20 Apr 2026 04:10PM UTC dunglas github
91.87
24676938426 chore/bump-deps ci: pin lint job to stable Go Without go-version, setup-go defaulted to 1.24 in the lint job, which is below the go.mod 1.25.0 floor; with GOTOOLCHAIN=local preventing auto-upgrade, golangci-lint failed to load packages. Co-Authored-By: Claude O... Pull #10 20 Apr 2026 04:05PM UTC dunglas github
91.87
24676830763 chore/bump-deps ci: bump actions, pin toolchain, add lint config - actions/checkout v4 -> v6, actions/setup-go v5 -> v6, golangci/golangci-lint-action v6 -> v9. shogo82148/actions-goveralls stays on v1 (still the current major). - Set GOTOOLCHAIN=local so se... Pull #10 20 Apr 2026 04:03PM UTC dunglas github
91.87
24676765192 chore/bump-deps ci: bump actions, pin toolchain, add lint config - actions/checkout v4 -> v6, actions/setup-go v5 -> v6, golangci/golangci-lint-action v6 -> v9. shogo82148/actions-goveralls stays on v1 (still the current major). - Set GOTOOLCHAIN=local so se... push 20 Apr 2026 04:01PM UTC dunglas github
91.87
24676482037 chore/bump-deps chore: bump all deps and widen CI to both maintained Go versions - `go get -u all` + `go mod tidy`, bumping: - github.com/nlnwa/whatwg-url v0.5.0 -> v0.6.2 - github.com/bits-and-blooms/bitset v1.14.3 -> v1.24.4 (indirect) - golang.org/x/exp... push 20 Apr 2026 03:56PM UTC dunglas github
91.87
24667373104 main perf: cache special-scheme flag and switch scheme checks to map lookups - Call protocolComponentMatchesSpecialScheme() once per New() and reuse the result for both the hostname and pathname branches instead of matching the component regex aga... push 20 Apr 2026 12:48PM UTC dunglas github
91.87
See All Builds (42)

Badge your Repo: go-urlpattern

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

© 2026 Coveralls, Inc