added visualisation

This commit is contained in:
Daniel Ledda
2020-11-04 23:50:44 +01:00
parent 42dfd20eb9
commit 4c106fd763
5 changed files with 20933 additions and 27 deletions

View File

@@ -77,15 +77,5 @@ func getPatternHandler(pattern string) http.HandlerFunc {
}
}
func sendInternalError(err error, context RequestContext) {
errorMessage := "Internal Server Error!"
if DEBUG {
errorMessage += fmt.Sprintf( " Happened during %s request for pattern '%s': %s",
context.MethodType,
context.Pattern,
err.Error())
}
fmt.Println(errorMessage)
http.Error(context.ResponseWriter, errorMessage, 500)
}