fix middlewares bugs: (#887)

bugs include:
- middleware doesn't send message meta
- send empty request when prettifier is off
- handle shutdown gracefully
- disable debug in example middlewares during test
This commit is contained in:
Urban Ishimwe
2021-01-25 16:08:57 +03:00
committed by GitHub
parent dfbaf2c808
commit 5e27c92f80
5 changed files with 179 additions and 228 deletions
+1 -1
View File
@@ -115,7 +115,7 @@ func encode(buf []byte) []byte {
}
func Debug(args ...interface{}) {
if os.Getenv("GOR_TEST") != "" { // if we are not testing
if os.Getenv("GOR_TEST") == "" { // if we are not testing
fmt.Fprint(os.Stderr, "[DEBUG][TOKEN-MOD] ")
fmt.Fprintln(os.Stderr, args...)
}