summaryrefslogtreecommitdiff
path: root/modules/caddyhttp/matchers_test.go
diff options
context:
space:
mode:
authorMatthew Holt <mholt@users.noreply.github.com>2019-05-14 14:14:05 -0600
committerMatthew Holt <mholt@users.noreply.github.com>2019-05-14 14:14:05 -0600
commitf9d93ead4ef6e099ba7e00318dce6509b0f1eda4 (patch)
treeb14b418475d25c1aa4d13cb53b5e162054570483 /modules/caddyhttp/matchers_test.go
parent8ae0d6a509fd1b871457cf742369af04346933a8 (diff)
Rename and export some types, other minor changes
Diffstat (limited to 'modules/caddyhttp/matchers_test.go')
-rw-r--r--modules/caddyhttp/matchers_test.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/caddyhttp/matchers_test.go b/modules/caddyhttp/matchers_test.go
index 07c98e3..7da09a6 100644
--- a/modules/caddyhttp/matchers_test.go
+++ b/modules/caddyhttp/matchers_test.go
@@ -205,7 +205,7 @@ func TestPathREMatcher(t *testing.T) {
// set up the fake request and its Replacer
req := &http.Request{URL: &url.URL{Path: tc.input}}
- repl := &Replacer{req: req, resp: httptest.NewRecorder(), custom: make(map[string]string)}
+ repl := NewReplacer(req, httptest.NewRecorder())
ctx := context.WithValue(req.Context(), ReplacerCtxKey, repl)
req = req.WithContext(ctx)
@@ -322,7 +322,7 @@ func TestHeaderREMatcher(t *testing.T) {
// set up the fake request and its Replacer
req := &http.Request{Header: tc.input, URL: new(url.URL)}
- repl := &Replacer{req: req, resp: httptest.NewRecorder(), custom: make(map[string]string)}
+ repl := NewReplacer(req, httptest.NewRecorder())
ctx := context.WithValue(req.Context(), ReplacerCtxKey, repl)
req = req.WithContext(ctx)