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

enetx / surf / 21510756790
83%

Build:
DEFAULT BRANCH: main
Ran 30 Jan 2026 09:22AM UTC
Jobs 1
Files 33
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

30 Jan 2026 09:19AM UTC coverage: 81.276% (-2.7%) from 83.943%
21510756790

push

github

enetx
feat(core): improve context cancellation support and error handling

Major changes:

Body:
- All read methods (Bytes, String, UTF8) now return g.Result for explicit error handling
- Reworked cancellation mechanism via context: uses SetReadDeadline instead of select in Read()
- Added race condition protection via sync.Once (readOnce, closeOnce, setupOnce)
- Optimized Close(): limited drain to 256KB, skip draining on cancelled context
- Stream() now returns StreamReader with Close() method for automatic resource cleanup

Proxy (connectproxy):
- Renamed DialTLS to DialTLSContext to support cancellation in TLS handshake
- Added context cancellation support in HTTP/1.1 CONNECT via SetDeadline
- Improved HTTP/2 connection reuse: reset connections on errors
- Protected http2.Transport (tr2) with sync.Once against race conditions
- Added SetResolver for custom DNS resolvers
- Improved resource cleanup on HTTP/2 CONNECT errors
- Use errors.Join to combine multiple errors

SOCKS4:
- Implemented DialContext to support context cancellation
- Added deadline setting from context
- Migrated DNS lookup to context-aware resolver.LookupIPAddr
- Pass context to underlying dialer when supported

Other:
- HTTP/2 cleartext (h2c) now uses DialContext instead of Dial
- Debug correctly handles Result types from Body.String()

These changes ensure proper operation cancellation via context,
explicit error handling, and protection against race conditions.

126 of 210 new or added lines in 6 files covered. (60.0%)

94 existing lines in 3 files now uncovered.

3095 of 3808 relevant lines covered (81.28%)

73.69 hits per line

New Missed Lines in Diff

Lines Coverage ∆ File
15
57.69
-18.07% pkg/socks4/socks4.go
32
77.65
-10.35% body.go
37
47.85
-11.26% pkg/connectproxy/connectproxy.go

Uncovered Existing Lines

Lines Coverage ∆ File
1
77.65
-10.35% body.go
29
57.69
-18.07% pkg/socks4/socks4.go
64
47.85
-11.26% pkg/connectproxy/connectproxy.go
Jobs
ID Job ID Ran Files Coverage
1 21510756790.1 30 Jan 2026 09:22AM UTC 33
81.28
GitHub Action Run
Source Files on build 21510756790
  • Tree
  • List 33
  • Changed 5
  • Source Changed 0
  • Coverage Changed 5
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • bc1c7ead on github
  • Prev Build on refs/tags/v1.0.176 (#21456663373)
  • Next Build on main (#21516979359)
  • 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