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

julienschmidt / httprouter / 265 / 3
100%
master: 100%

Build:
DEFAULT BRANCH: master
Ran 22 Feb 2018 02:27PM UTC
Files 4
Run time 0s
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

22 Feb 2018 02:26PM UTC coverage: 99.437% (-0.6%) from 100.0%
265.3

push

travis-ci

julienschmidt
Params via Go 1.7 Contexts (#147)

* Supports Params in net/http Handlers with go1.7+

Go 1.7 introduces request-scoped context, providing a place to hang
Params even in net/http standard Handlers attached with Router.Handler
or Router.HandlerFunc.

This provides an alternative implementation of Router.Handler which
attaches the params to the request context. It also includes a bit of
new public API: ParamsKey is the context key used, and
ParamsFromContext uses ParamsKey to get Params from a context.Context.

All of this is guarded by a "go1.7" build tag. With go 1.6 and older
none of the new API is available and Params continue to be thrown away
in Handler/HandlerFunc-attached endpoints.

* WithValue is the 'context' function

* use an un-exported struct{} alias to collision-proof the key

* no longer a const

* update README.md to reflect additional allocations with the stdlib-compatible api

707 of 711 relevant lines covered (99.44%)

118.06 hits per line

Source Files on job 265.3
  • Tree
  • List 0
  • Changed 1
  • Source Changed 1
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 1
  • Travis Job 265.3
  • d767e590 on github
  • Prev Job for on master (#262.4)
  • Next Job for on master (#266.2)
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