Commit Graph

94 Commits

Author SHA1 Message Date
Matt Silverlock
ca524fd37f Updated README w/ runnable example. Addresses #32. 2015-08-08 12:41:49 +08:00
Kamil Kisiel
8965bfef36 Merge branch 'subexp-fix' 2015-08-07 13:34:10 -07:00
Kamil Kisiel
c3c5f0000f Add test which used to fail for queries.
Fixes #66
2015-08-06 22:12:38 -07:00
Kamil Kisiel
780d0505d7 Update README 2015-08-06 20:46:08 -07:00
Kamil Kisiel
e73f183699 fix use of capturing subexpressions in pattern matches.
The router now associates a regexp named group with each mux variable.
It only fills variables when capturing group name match instead of
relying on indices, which doesn't work if a variable regexp has interior
capturing groups.

Fixes #62
2015-08-06 20:32:43 -07:00
Kamil Kisiel
5a8a040050 Merge pull request #116 from brocaar/add_current_route_note
Add note about the availability of CurrentRoute.
2015-08-05 09:48:15 -07:00
Orne Brocaar
13c8226081 Update comment and specify KeepContext option. 2015-08-05 10:24:37 +02:00
Orne Brocaar
39cff3481c Add note about the availability of CurrentRoute. 2015-08-05 09:26:50 +02:00
Kamil Kisiel
f15e0c4946 Merge pull request #100 from eastwood/master
Issue #16: Added regex support for matching headers
2015-07-27 09:40:50 -07:00
Clint Ryan
98fb535d77 Issue 16: Return the regexp compile error 2015-07-19 18:57:47 +10:00
Kamil Kisiel
ba336c9cfb getUrlQuery: Use SplitN with a max of 2. 2015-07-17 08:03:03 -07:00
Kamil Kisiel
61445102e8 Merge pull request #111 from burrbd/master
Issue #109
2015-07-17 08:02:10 -07:00
Bay Dodd
3339267a85 adding tests 2015-07-17 10:52:37 +01:00
Bay Dodd
fe40f0d056 updating query match string 2015-07-17 10:19:25 +01:00
Kamil Kisiel
104068abd5 Merge pull request #106 from Digitalxero/router-walk-adjustments
Update the walk method  …
2015-07-16 10:39:48 -07:00
Kamil Kisiel
fe156cb197 Merge pull request #108 from burrbd/master
fix for empty query
2015-07-16 07:26:10 -07:00
Bay Dodd
19f0a91c4e adding test and updating condition 2015-07-16 12:48:02 +01:00
Bay Dodd
2b32409792 fix for empty query 2015-07-16 10:52:01 +01:00
Dj Gilcrease
92ae1d6726 Update the walk method to walk matchers so it walks the full list of routers and child routers 2015-07-09 11:46:53 -07:00
Kamil Kisiel
9cb89f07ca Add a couple of additional tests for query strings. 2015-07-05 16:02:00 -07:00
Bay Dodd
0c9d5c08c1 refactoring 2015-07-05 23:03:37 +01:00
Bay Dodd
a710a8bfa9 adding ^ and $ to query pattern 2015-07-05 12:49:02 +01:00
Clint Ryan
306509329b Merge branch 'master' of https://github.com/eastwood/mux
Conflicts:
	mux.go
2015-07-05 20:19:34 +10:00
Clint Ryan
c21431a6cd Fixed up commenting and removed unused code 2015-07-05 20:18:38 +10:00
Craig Jellick
c0a5cbce5a Fix typo
Issue #16: Added regex support for matching headers

Issue #16 : Addressed code review and refactored support for regex into
a separate function

Added compiled regex to route matcher
2015-07-05 20:15:55 +10:00
Craig Jellick
a063f14812 Fix typo
Issue #16: Added regex support for matching headers

Issue #16 : Addressed code review and refactored support for regex into
a separate function

Added compiled regex to route matcher
2015-07-05 20:12:48 +10:00
Kamil Kisiel
47e8f450ef Merge pull request #98 from cjellick/doc-fix
Fix typo
2015-05-30 12:53:56 -07:00
Craig Jellick
77f424d3ae Fix typo 2015-05-29 14:16:30 -07:00
Kamil Kisiel
94903de8c9 Merge pull request #89 from gemnasium/add_tests_for_pipe
Add complementary test for patterns with pipe
2015-05-05 10:01:36 -07:00
Kamil Kisiel
660d31f860 Merge pull request #93 from shurcooL/patch-1
Fix up doc formatting, use spaces for alignment (tabs are for indentation only).
2015-04-22 13:14:49 -07:00
Dmitri Shuralyov
9641367e95 Fix up doc formatting, use spaces for alignment (tabs are for indentation only).
This fixes issue where if user has tab width other than 4, some lines will become misaligned. For example, see the package description at https://godoc.org/github.com/gorilla/mux.
2015-04-22 12:28:32 -07:00
Kamil Kisiel
8096f47503 Merge pull request #88 from gemnasium/add_tests_for_pipe
Add tests for patterns with pipe
2015-03-10 20:17:35 -07:00
Philippe Lafoucrière
e98fd88cbd Add complementary test for patterns with pipe 2015-03-10 21:48:38 -04:00
Philippe Lafoucrière
00bf0e01a1 Add tests for patterns with pipe
closes #62
2015-03-10 21:38:35 -04:00
Kamil Kisiel
8a875a034c Merge pull request #52 from sqs/BuildVarsFunc
BuildVarsFunc: modify route variables before building the URL from a route
2015-02-13 11:22:55 -08:00
Kamil Kisiel
e444e69cbd Merge pull request #71 from Madrigal/patch-1
Rearrange code
2014-09-26 08:38:14 -07:00
Felipe Madrigal
d7e4639818 Rearrange rules for matching strict slash 2014-09-26 00:20:46 -05:00
Felipe Madrigal
8df3a80fb8 Rearrange getHost function 2014-09-26 00:20:12 -05:00
Kamil Kisiel
4b8fbc56f3 Merge pull request #67 from pwaller/patch-1
Remove blank line to fix docs for  Route.Queries
2014-08-11 07:46:53 -07:00
Peter Waller
8f1a419c38 Remove blank line to fix docs for Route.Queries
The presence of a blank line was preventing the documentation from appearing in godoc.
2014-08-11 15:45:39 +01:00
Kamil Kisiel
14cafe2851 Merge pull request #60 from roylee17/gofmt
gofmt
2014-06-24 11:46:26 -07:00
Tzu-Jung Lee
3351f602a5 gofmt 2014-06-24 11:40:51 -07:00
Kamil Kisiel
854d482e26 Fix racy modification of NotFoundHandler. 2014-06-04 14:12:38 -07:00
Kamil Kisiel
0ef595e787 Merge pull request #56 from raphael/query-vars
Fix "Queries" matcher to support out-of-order query string parameters
2014-05-27 16:41:47 -07:00
Raphael Simon
451fd8b779 Additional code cleanup (see comments on issue #56) 2014-05-27 16:37:30 -07:00
Raphael Simon
3505396fb5 Code cleanup (see comments on issue #56) 2014-05-27 11:36:15 -07:00
Raphael Simon
69237eaae5 Fix "Queries" matcher to support out-of-order query string parameters 2014-05-27 09:34:08 -07:00
Kamil Kisiel
2900ff05a4 Merge pull request #55 from raphael/query-vars
Add ability to capture variables in query strings
2014-05-26 21:48:09 -07:00
Raphael Simon
0a0d6a1b2a Add tests for regexp variables in query strings
Fix how regular expression gets built for query string so that order of parameters is always preserved
2014-05-26 20:20:14 -07:00
Raphael Simon
c9469524da Fix old tests
Remove tests that don't apply anymore
Fix scheme matcher tests
2014-05-26 15:13:05 -07:00