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

dunglas / go-urlpattern / 24727388304
92%

Build:
DEFAULT BRANCH: main
Ran 21 Apr 2026 02:15PM UTC
Jobs 1
Files 6
Run time 1min
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

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

Uncovered Changes

Lines Coverage ∆ File
4
96.08
0.0% parts.go
3
85.86
0.04% parser.go
Jobs
ID Job ID Ran Files Coverage
1 24727388304.1 21 Apr 2026 02:15PM UTC 6
91.88
GitHub Action Run
Source Files on build 24727388304
  • Tree
  • List 6
  • Changed 3
  • Source Changed 0
  • Coverage Changed 3
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • cbab7cf1 on github
  • Prev Build on main (#24677587846)
  • Delete
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