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)