From 92bd91441893e41c39bb9ca2cf5d2dc509bfdbc8 Mon Sep 17 00:00:00 2001 From: Abiola Ibrahim Date: Wed, 23 Dec 2015 13:23:43 +0100 Subject: [PATCH] Fix vet errors. --- caddy/setup/rewrite_test.go | 2 +- middleware/rewrite/condition_test.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/caddy/setup/rewrite_test.go b/caddy/setup/rewrite_test.go index f3d2e925..c43818b2 100644 --- a/caddy/setup/rewrite_test.go +++ b/caddy/setup/rewrite_test.go @@ -135,7 +135,7 @@ func TestRewriteParse(t *testing.T) { to /to if {path} is a }`, false, []rewrite.Rule{ - &rewrite.ComplexRule{Base: "/", To: "/to", Ifs: []rewrite.If{rewrite.If{"{path}", "is", "a"}}}, + &rewrite.ComplexRule{Base: "/", To: "/to", Ifs: []rewrite.If{rewrite.If{A: "{path}", Operator: "is", B: "a"}}}, }}, } diff --git a/middleware/rewrite/condition_test.go b/middleware/rewrite/condition_test.go index 7db20647..c056f896 100644 --- a/middleware/rewrite/condition_test.go +++ b/middleware/rewrite/condition_test.go @@ -55,7 +55,7 @@ func TestConditions(t *testing.T) { for _, op := range invalidOperators { _, err := NewIf("a", op, "b") if err == nil { - t.Error("Invalid operator %v used, expected error.", op) + t.Errorf("Invalid operator %v used, expected error.", op) } }