Permalink
Browse files

Revert "add splat support"

This reverts commit 8071200.

Conflicts:

	mux.go
  • Loading branch information...
1 parent 56f4d96 commit ec0d17af3dd73f2914267d9427742837aff3c0f5 @bmizerany committed Mar 5, 2012
Showing with 0 additions and 13 deletions.
  1. +0 −5 mux.go
  2. +0 −8 mux_test.go
View
5 mux.go
@@ -59,11 +59,6 @@ func (ph *patHandler) try(path string) (url.Values, bool) {
switch {
case j >= len(ph.pat):
return nil, false
- case ph.pat[j] == '*':
- j++
- val := path[i:]
- p.Add(":splat", val)
- i = len(path)
case ph.pat[j] == ':':
var name, val string
name, j = find(ph.pat, '/', j)
View
@@ -41,14 +41,6 @@ func TestPatMatch(t *testing.T) {
params, ok = (&patHandler{"/foo/x:name", nil}).try("/foo/xbar")
assert.Equal(t, true, ok)
assert.Equal(t, url.Values{":name": {"bar"}}, params)
-
- params, ok = (&patHandler{"/foo/*", nil}).try("/foo/bar/baz")
- assert.Equal(t, true, ok)
- assert.Equal(t, url.Values{":splat": {"bar/baz"}}, params)
-
- params, ok = (&patHandler{"/foo/*", nil}).try("/foo/bar")
- assert.Equal(t, true, ok)
- assert.Equal(t, url.Values{":splat": {"bar"}}, params)
}
func TestPatRoutingHit(t *testing.T) {

0 comments on commit ec0d17a

Please sign in to comment.