From 352d7415582568f5131ee15579b04280cbbbc48f Mon Sep 17 00:00:00 2001 From: Kegan Dougal Date: Tue, 25 Oct 2016 16:14:16 +0100 Subject: [PATCH] Review comments --- hooks/pre-commit | 2 +- src/github.com/matrix-org/go-neb/goneb_services_test.go | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/hooks/pre-commit b/hooks/pre-commit index d9ffbfb..09ff264 100755 --- a/hooks/pre-commit +++ b/hooks/pre-commit @@ -6,4 +6,4 @@ golint src/... go fmt ./src/... go tool vet --shadow ./src gocyclo -over 12 src/ -gb test +gb test -timeout 5s diff --git a/src/github.com/matrix-org/go-neb/goneb_services_test.go b/src/github.com/matrix-org/go-neb/goneb_services_test.go index 6e500b7..baa925a 100644 --- a/src/github.com/matrix-org/go-neb/goneb_services_test.go +++ b/src/github.com/matrix-org/go-neb/goneb_services_test.go @@ -2,10 +2,10 @@ package main import ( "bytes" + "fmt" "net/http" "net/http/httptest" "os" - "strconv" "testing" ) @@ -20,8 +20,8 @@ func (rt MockTripper) RoundTrip(req *http.Request) (*http.Response, error) { h := rt.handlers[key] if h == nil { panic( - "Test RoundTrip: Unhandled request: " + key + "\n" + - "Handlers: " + strconv.Itoa(len(rt.handlers)), + fmt.Sprintf("Test RoundTrip: Unhandled request: %s\nHandlers: %d", + key, len(rt.handlers)), ) } return h(req)