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

tecnickcom / gogen / 28741253742
100%

Build:
DEFAULT BRANCH: main
Ran 05 Jul 2026 12:51PM UTC
Jobs 1
Files 165
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

05 Jul 2026 12:46PM UTC coverage: 99.944% (-0.02%) from 99.959%
28741253742

push

github

nicolaasuni
feat(httputil)!: correctness fixes, JSend status round-trip, and API cleanup

Correctness:
- ResponseWriterWrapper now forwards 1xx informational responses (except 101 Switching Protocols) without latching, so handlers using 103 Early Hints deliver their real final status to the client instead of a spurious implicit 200
- response senders clear any stale Content-Length before writing (restoring net/http's http.Error parity), so a length set by a caller before delegating can no longer truncate the body
- SendJSON/SendXML marshal the full payload before writing any header and fall back to a clean 500 on failure, instead of emitting a success status with a partial or empty body
- AddAuthorizationHeader replaces rather than appends the Authorization header (a singleton per RFC 9110), so refreshing a token before a retry no longer sends stale credentials
- PathParam strips only the router-added slash (TrimPrefix), preserving client-supplied leading slashes in catch-all parameters

JSend status:
- add Status.UnmarshalJSON and the exported ErrInvalidStatus so jsendx.Response round-trips JSON, and add Status.String (fmt.Stringer) so slog text handlers render the JSend string ("error") instead of the raw code

Observability:
- logResponse emits via LogAttrs with the request context, correlates entries with a trace ID, and maps levels by class (2xx debug, 4xx warn, 5xx error), guarded by Logger.Enabled to skip attribute construction for records that would be discarded
- writeHeaders sets X-Content-Type-Options: nosniff on all responses, and SendStatus now goes through it (gaining the shared no-cache headers)

API and simplification:
- remove the deprecated AddJsonHeaders alias (use AddJSONHeaders) and the unused jsendx.RouterArgs type
- Link trims a trailing slash on the base URL to avoid a double separator, and documents that untrusted segments must be escaped
- QueryIntOrDefault/QueryUintOrDefault use strconv directly, StringValueOrDefault uses cmp.Or, and Ne... (continued)

101 of 101 new or added lines in 5 files covered. (100.0%)

2 existing lines in 1 file now uncovered.

12390 of 12397 relevant lines covered (99.94%)

103987.24 hits per line

Coverage Regressions

Lines Coverage ∆ File
2
98.86
-1.14% pkg/sleuth/client.go
Jobs
ID Job ID Ran Files Coverage
1 28741253742.1 05 Jul 2026 12:51PM UTC 165
99.94
GitHub Action Run
Source Files on build 28741253742
  • Tree
  • List 165
  • Changed 6
  • Source Changed 5
  • Coverage Changed 6
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #28741253742
  • 4640c970 on github
  • Prev Build on main (#28739301420)
  • Next Build on main (#28744525707)
  • 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