summaryrefslogtreecommitdiff
path: root/modules/caddyhttp/map/map_test.go
diff options
context:
space:
mode:
authorFrancis Lavoie <lavofr@gmail.com>2022-08-02 16:39:09 -0400
committerGitHub <noreply@github.com>2022-08-02 16:39:09 -0400
commit141872ed80d6323505e7543628c259fdae8506d3 (patch)
tree53581cddf2fcce189c3a55019194b64b0cd3af13 /modules/caddyhttp/map/map_test.go
parentdb1aa5b5bc174e5a5df39a277f737b304e1e2350 (diff)
chore: Bump up to Go 1.19, minimum 1.18 (#4925)
Diffstat (limited to 'modules/caddyhttp/map/map_test.go')
-rw-r--r--modules/caddyhttp/map/map_test.go22
1 files changed, 11 insertions, 11 deletions
diff --git a/modules/caddyhttp/map/map_test.go b/modules/caddyhttp/map/map_test.go
index 26d6e85..fe233bf 100644
--- a/modules/caddyhttp/map/map_test.go
+++ b/modules/caddyhttp/map/map_test.go
@@ -15,7 +15,7 @@ func TestHandler(t *testing.T) {
for i, tc := range []struct {
handler Handler
reqURI string
- expect map[string]interface{}
+ expect map[string]any
}{
{
reqURI: "/foo",
@@ -25,11 +25,11 @@ func TestHandler(t *testing.T) {
Mappings: []Mapping{
{
Input: "/foo",
- Outputs: []interface{}{"FOO"},
+ Outputs: []any{"FOO"},
},
},
},
- expect: map[string]interface{}{
+ expect: map[string]any{
"output": "FOO",
},
},
@@ -41,11 +41,11 @@ func TestHandler(t *testing.T) {
Mappings: []Mapping{
{
InputRegexp: "(/abc)",
- Outputs: []interface{}{"ABC"},
+ Outputs: []any{"ABC"},
},
},
},
- expect: map[string]interface{}{
+ expect: map[string]any{
"output": "ABC",
},
},
@@ -57,11 +57,11 @@ func TestHandler(t *testing.T) {
Mappings: []Mapping{
{
InputRegexp: "(xyz)",
- Outputs: []interface{}{"...${1}..."},
+ Outputs: []any{"...${1}..."},
},
},
},
- expect: map[string]interface{}{
+ expect: map[string]any{
"output": "...xyz...",
},
},
@@ -74,11 +74,11 @@ func TestHandler(t *testing.T) {
Mappings: []Mapping{
{
InputRegexp: "(?i)(\\^|`|<|>|%|\\\\|\\{|\\}|\\|)",
- Outputs: []interface{}{"3"},
+ Outputs: []any{"3"},
},
},
},
- expect: map[string]interface{}{
+ expect: map[string]any{
"output": "3",
},
},
@@ -90,11 +90,11 @@ func TestHandler(t *testing.T) {
Mappings: []Mapping{
{
Input: "/foo",
- Outputs: []interface{}{"{testvar}"},
+ Outputs: []any{"{testvar}"},
},
},
},
- expect: map[string]interface{}{
+ expect: map[string]any{
"output": "testing",
},
},