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

go-pkgz / rest
96%
master: 96%

Build:
Build:
LAST BUILD BRANCH: refs/tags/v1.22.0
DEFAULT BRANCH: master
Repo Added 14 Jul 2018 07:41PM UTC
Files 22
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 timeout-middleware
branch: timeout-middleware
CHANGE BRANCH
x
Reset
  • timeout-middleware
  • 1.1.3
  • add-ping-head-support
  • apache-log
  • benchmarks
  • cors-preflight-vary
  • dependabot/go_modules/go_modules-5a9c29dde4
  • dependabot/go_modules/go_modules-dd7da38a6b
  • dependabot/go_modules/go_modules-ee7f9554a6
  • fix-ci-caching
  • fix-content-type-header
  • fs-opts
  • hashed-auth
  • health
  • master
  • new-middlewares
  • paskal/add_ipv4_link_local
  • paskal/golangci_lint
  • paskal/remove_errors
  • rbac
  • realip
  • realip-cdn-support
  • refs/tags/v1.10.0
  • refs/tags/v1.11.0
  • refs/tags/v1.12.0
  • refs/tags/v1.12.1
  • refs/tags/v1.13.0
  • refs/tags/v1.14.0
  • refs/tags/v1.15.0
  • refs/tags/v1.15.1
  • refs/tags/v1.15.2
  • refs/tags/v1.15.3
  • refs/tags/v1.15.4
  • refs/tags/v1.15.5
  • refs/tags/v1.15.6
  • refs/tags/v1.16.0
  • refs/tags/v1.17.0
  • refs/tags/v1.18.0
  • refs/tags/v1.18.1
  • refs/tags/v1.18.2
  • refs/tags/v1.19.0
  • refs/tags/v1.20.0
  • refs/tags/v1.20.1
  • refs/tags/v1.20.2
  • refs/tags/v1.20.3
  • refs/tags/v1.20.4
  • refs/tags/v1.20.5
  • refs/tags/v1.20.6
  • refs/tags/v1.20.7
  • refs/tags/v1.21.0
  • refs/tags/v1.22.0
  • refs/tags/v1.5.0
  • refs/tags/v1.5.4
  • refs/tags/v1.6.0
  • refs/tags/v1.6.1
  • refs/tags/v1.7.0
  • refs/tags/v1.8.0
  • refs/tags/v1.8.1
  • refs/tags/v1.8.2
  • refs/tags/v1.9.0
  • refs/tags/v1.9.1
  • refs/tags/v1.9.2
  • throttle
  • tollboth
  • v1.0.0
  • v1.1.0
  • v1.1.1
  • v1.1.2
  • v1.1.3
  • v1.1.4
  • v1.1.5
  • v1.1.6
  • v1.2.0
  • v1.3.0
  • v1.3.1
  • v1.3.2
  • v1.4.0
  • v1.4.1

01 Jul 2026 09:17AM UTC coverage: 96.21% (+0.2%) from 96.0%
28506976457

Pull #45

github

paskal
feat: add Timeout middleware

Enforces a maximum request duration: the next handler runs in a goroutine with a
context deadline, and if it has not finished by the deadline the middleware responds
with 504 Gateway Timeout at the deadline — even for a handler that ignores the context.

Modeled on net/http.TimeoutHandler: the handler's output is buffered and written
through on success; if the deadline fires first the buffered output is discarded, a
504 is sent, and further handler writes return http.ErrHandlerTimeout. A canceled
parent context stops the handler without sending a 504. Panics propagate. Because the
response is buffered, http.Flusher and http.Hijacker are not supported (documented).
Pull Request #45: feat: add Timeout middleware

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

1244 of 1293 relevant lines covered (96.21%)

51.29 hits per line

Relevant lines Covered
Build:
Build:
1293 RELEVANT LINES 1244 COVERED LINES
51.29 HITS PER LINE
Source Files on timeout-middleware
  • Tree
  • List 22
  • Changed 0
  • Source Changed 0
  • Coverage Changed 0
Coverage ∆ File Lines Relevant Covered Missed Hits/Line

Recent builds

Builds Branch Commit Type Ran Committer Via Coverage
28506976457 timeout-middleware feat: add Timeout middleware Enforces a maximum request duration: the next handler runs in a goroutine with a context deadline, and if it has not finished by the deadline the middleware responds with 504 Gateway Timeout at the deadline — even for... Pull #45 01 Jul 2026 09:17AM UTC paskal github
96.21
28485193325 timeout-middleware feat: add Timeout middleware Enforces a maximum request duration: the next handler runs in a goroutine with a context deadline, and if it has not finished by the deadline the middleware responds with 504 Gateway Timeout at the deadline — even for... Pull #45 01 Jul 2026 12:35AM UTC paskal github
96.2
28484997602 timeout-middleware feat: add Timeout middleware Enforces a maximum request duration: the next handler runs in a goroutine with a context deadline, and if it has not finished by the deadline the middleware responds with 504 Gateway Timeout at the deadline — even for... Pull #45 01 Jul 2026 12:30AM UTC paskal github
96.19
28484999833 timeout-middleware feat: add Timeout middleware Enforces a maximum request duration: the next handler runs in a goroutine with a context deadline, and if it has not finished by the deadline the middleware responds with 504 Gateway Timeout at the deadline — even for... Pull #45 01 Jul 2026 12:30AM UTC paskal github
96.19
28484253475 timeout-middleware feat: add Timeout middleware Bounds a request to a given duration via context.WithTimeout and responds with 504 if the deadline is exceeded before the handler writes a response. Wraps the ResponseWriter to track (atomically) whether the response... Pull #45 01 Jul 2026 12:11AM UTC paskal github
96.12
28484255298 timeout-middleware feat: add Timeout middleware Bounds a request to a given duration via context.WithTimeout and responds with 504 if the deadline is exceeded before the handler writes a response. Wraps the ResponseWriter to track (atomically) whether the response... Pull #45 01 Jul 2026 12:11AM UTC paskal github
96.12
28483671834 timeout-middleware feat: add Timeout middleware Bounds a request to a given duration via context.WithTimeout and responds with 504 if the deadline is exceeded before the handler writes a response. Wraps the ResponseWriter to track whether the response was already c... Pull #45 30 Jun 2026 11:57PM UTC paskal github
96.12
28482804882 timeout-middleware feat: add Timeout middleware Bounds a request to a given duration via context.WithTimeout and responds with 504 if the deadline is exceeded before the handler writes a response. Wraps the ResponseWriter to track whether the response was already c... Pull #45 30 Jun 2026 11:35PM UTC paskal github
96.1
28482005150 timeout-middleware fix: resolve golangci-lint v2.12 findings Use slices.Backward in Wrap (modernize) and fmt.Fprintf instead of WriteString(fmt.Sprintf(...)) in the logger (staticcheck QF1012). Pull #45 30 Jun 2026 11:16PM UTC paskal github
95.37
See All Builds (288)
  • 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