Peter Kieltyka
bf722e8cfa
Deprecate ServerBaseContext in favour of stdlib http.Server#BaseContext
2020-12-05 14:57:51 -05:00
Peter Kieltyka
364c5647f7
Update comments and benchmarks after 1 allocation optimization, thanks @bouk
2020-11-29 17:34:05 -05:00
Bouke van der Bijl
8391bdb4da
Remove one allocation by foregoing context.WithValue ( #555 )
...
Instead of we can make Context implement the context.Context interface
directly through a private type, which just implements the Value method.
2020-11-29 17:12:28 -05:00
Peter Kieltyka
fdba45dc93
cosmetic, move public methods to top of source file
2020-06-02 10:54:52 -04:00
Julian R Figueroa
e7728c6d4b
Replace wildcards correctly in RoutePattern ( #515 )
2020-05-30 19:05:35 -04:00
coryory
221acf29d0
Fix cast panic and just return nil if invalid
2019-10-31 19:34:02 +09:00
Christian Muehlhaeuser
b83ac995c3
Simplify code
...
- We can access the pointer members directly
- Easier to read concatenation
2019-08-06 21:12:21 -04:00
emersion
57eb9c7a75
Fix doc codeblock in Context.RoutePattern
2018-08-16 08:23:23 +01:00
Peter Kieltyka
d132b31857
middleware.GetHead ( #248 )
...
Add Match(..) bool to chi.Routes, and add middleware.GetHead to automatically route missing head requests to GET handlers
* Put chi.Routes pointer on the route Context instead of having to pass to the middleware
* Rename FindHandler to Find, and add breaking test when searching subtrees
* Rename middleware to GetHead, and update Mux#Find method to search subroutes
* Update README, router at ~1000 LOC
* Redefine Routes#Find(..) http.Handler to Routes#Match(..) bool
* Update benchmarks
* Slightly adjust GetHead middleware to make it clearer
2017-08-31 21:51:08 -04:00
Peter Kieltyka
25354a53cc
go vet and golint the project, release 3.1.5
2017-08-02 17:27:05 -04:00
Peter Kieltyka
168b7ac573
Add comment about Context.RoutePattern()
2017-07-31 14:02:39 -04:00
Peter Kieltyka
7e6b856011
Flatten Context.URLParams data structure
2017-07-24 16:38:22 -04:00
Peter Kieltyka
49e7138cab
organize routing patterns as endpoints with pattern, handler, paramKeys in the leaf nodes
2017-07-09 19:17:12 -04:00
Peter Kieltyka
25201e8a88
Export access to Context.URLParams
2017-07-08 18:12:46 -04:00
Peter Kieltyka
02e6bbdfd1
v3.0.0 release
2017-06-21 10:43:59 -04:00
Peter Kieltyka
8f717baab4
v3 beta 1
2017-06-21 10:43:59 -04:00
Cyril David
f3cc7c5790
OPTIMIZE: Change ServerBaseContext
2017-01-16 10:57:07 -08:00
Peter Kieltyka
630ea6f7dc
Rename WithBaseContext() to ServerBaseContext()
2016-10-07 11:17:13 -04:00
Peter Kieltyka
9597b63921
Add WithBaseContext(http.Handler, context.Context) http.Handler method
2016-10-07 10:56:39 -04:00
Jose Carlos Ustra Junior
1c72bb6879
Resolve golint issues that are not related to comments
2016-09-22 13:54:14 -03:00
Peter Kieltyka
61be033f8e
Change inline chain handlers to support doc generation
2016-08-17 16:52:04 -07:00
Peter Kieltyka
6ca1005b79
Fix context value chaining
2016-08-17 16:16:12 -07:00
Peter Kieltyka
da304acca4
Set parent context on a route context
2016-08-05 17:08:49 -04:00
Peter Kieltyka
a8fcebb98b
Update comments and examples, more to come
2016-07-26 16:49:44 -04:00
Peter Kieltyka
34af882aa1
Record routing patterns throughout a request lifecycle
2016-07-22 11:34:02 -04:00
Peter Kieltyka
e10a47f9d4
Refinements
2016-07-21 22:30:07 -04:00
Peter Kieltyka
292571a45f
Connect subrouters through middleware as separate muxes, begin mounting trees
2016-07-14 16:25:17 -04:00
Peter Kieltyka
c54b122dfe
Refactor subrouters to build into a single tree
2016-07-11 07:28:48 -06:00
Peter Kieltyka
c12bec07f7
Remove parent context from constructors
2016-07-04 15:27:57 -04:00
Peter Kieltyka
acad025092
Update contextKey definition
2016-07-04 15:11:54 -04:00
Peter Kieltyka
6c38bd10bf
Rename old-Route to Group and old-Group to Inline
2016-06-20 16:44:29 -04:00
Peter Kieltyka
9c87d91877
chi v2 first pass
2016-04-10 21:02:45 -04:00
Peter Kieltyka
3031602cdf
Document methods
2016-04-03 11:56:35 -04:00
Peter Kieltyka
f8b6dfe1ef
Routing context improvements
2016-04-02 08:45:37 -04:00
Peter Kieltyka
2923696253
Optimize edge finding a bit
2016-03-31 13:26:04 -04:00
Peter Kieltyka
4819c4616e
Remove old ctx key
2016-03-30 09:58:04 -04:00
Peter Kieltyka
520d4e05d3
Reuse root context in a sync pool to reduce GC: zero-alloc routing
2016-03-30 09:48:24 -04:00