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

julienschmidt / httprouter / 265
100%

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

pending completion
265

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

17 of 17 new or added lines in 2 files covered. (100.0%)

712 of 716 relevant lines covered (99.44%)

351.7 hits per line

New Missed Lines in Diff

Lines Coverage ∆ File
4
100.0
stdparams.go
Jobs
ID Job ID Ran Files Coverage
1 265.1 22 Feb 2018 02:28PM UTC 0
100.0
Travis Job 265.1
2 265.2 22 Feb 2018 02:27PM UTC 0
99.44
Travis Job 265.2
3 265.3 22 Feb 2018 02:27PM UTC 0
99.44
Travis Job 265.3
Source Files on build 265
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #265
  • d767e590 on github
  • Prev Build on master (#262)
  • Next Build on master (#266)
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