aboutsummaryrefslogtreecommitdiffhomepage
path: root/replacer_test.go
diff options
context:
space:
mode:
authorMatthew Holt <[email protected]>2019-12-17 16:29:09 -0700
committerMatthew Holt <[email protected]>2019-12-17 16:29:09 -0700
commitfe516575db3da5c0b9eba74b07066ecc22d90ba4 (patch)
tree2c255d486db97dcbf818c4d7221d218bf162ab6f /replacer_test.go
parent080a62d5c5cf07db2f4183f4c8741ff9810d033f (diff)
downloadcaddy-fe516575db3da5c0b9eba74b07066ecc22d90ba4.tar.gz
caddy-fe516575db3da5c0b9eba74b07066ecc22d90ba4.zip
core: Add ReplaceFunc method to Replacer to allow dynamic replacements
Diffstat (limited to 'replacer_test.go')
-rw-r--r--replacer_test.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/replacer_test.go b/replacer_test.go
index fa9b56930..88e83f550 100644
--- a/replacer_test.go
+++ b/replacer_test.go
@@ -133,7 +133,7 @@ func TestReplacerSet(t *testing.T) {
func TestReplacerReplaceKnown(t *testing.T) {
rep := replacer{
- providers: []ReplacementFunc{
+ providers: []ReplacerFunc{
// split our possible vars to two functions (to test if both functions are called)
func(key string) (val string, ok bool) {
switch key {
@@ -239,7 +239,7 @@ func TestReplacerDelete(t *testing.T) {
func TestReplacerMap(t *testing.T) {
rep := testReplacer()
- for i, tc := range []ReplacementFunc{
+ for i, tc := range []ReplacerFunc{
func(key string) (val string, ok bool) {
return "", false
},
@@ -317,7 +317,7 @@ func TestReplacerNew(t *testing.T) {
func testReplacer() replacer {
return replacer{
- providers: make([]ReplacementFunc, 0),
+ providers: make([]ReplacerFunc, 0),
static: make(map[string]string),
}
}