From 8bc7b93bc815467260280441fc7d31125e866b61 Mon Sep 17 00:00:00 2001 From: Josh Harmon Date: Tue, 4 Jul 2017 22:39:15 -0700 Subject: [PATCH] proxy: Fix CI fail from format token in Error call go vet caused a build fail in https://travis-ci.org/mholt/caddy/jobs/248392875: upstream_test.go:480::error: possible formatting directive in Error call (vet) This patch changes the Error call added in commit 078c991574647c27 to an Errorf call to support the use of the %d token. --- caddyhttp/proxy/upstream_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/caddyhttp/proxy/upstream_test.go b/caddyhttp/proxy/upstream_test.go index c19547bb..b2773dd4 100644 --- a/caddyhttp/proxy/upstream_test.go +++ b/caddyhttp/proxy/upstream_test.go @@ -477,7 +477,7 @@ func TestHealthCheckContentString(t *testing.T) { for i, test := range tests { u, err := NewStaticUpstreams(caddyfile.NewDispenser("Testfile", strings.NewReader(test.config)), "") if err != nil { - t.Error("Expected no error. Test %d Got:", i, err.Error()) + t.Errorf("Expected no error. Test %d Got: %s", i, err.Error()) } for _, upstream := range u { staticUpstream, ok := upstream.(*staticUpstream)