improving logging (#5)

* small refactoring of error messages

* (very) small refactoring of structs instantiation

* improving logging with debug messages

* using INFO level as default + changing previous debug message to info message
This commit is contained in:
Julien Neuhart
2018-05-04 17:43:19 +02:00
committed by GitHub
parent 810d35ffbe
commit 2871fb1ffe
30 changed files with 1275 additions and 61 deletions

View File

@@ -62,6 +62,13 @@ func TestGetHandlersChain(t *testing.T) {
}
}
func TestRequestHasNoContentError(t *testing.T) {
err := &requestHasNoContentError{}
if err.Error() != requestHasNoContentErrorMessage {
t.Errorf("Error returned a wrong message: got '%s' want '%s'", err.Error(), requestHasNoContentErrorMessage)
}
}
func TestEnforceContentLengthHandler(t *testing.T) {
var (
req *http.Request