test: write at least status code in example

This commit is contained in:
Marvin Preuss 2022-01-17 11:28:17 +01:00
parent 21b64e658e
commit b57a91bda5

View File

@ -18,6 +18,8 @@ func Example() {
logger := logginghandler.Logger(r) logger := logginghandler.Logger(r)
logger.Info().Msg("this is a request") logger.Info().Msg("this is a request")
w.WriteHeader(http.StatusOK)
})) }))
http.Handle("/", handler) http.Handle("/", handler)
@ -25,6 +27,7 @@ func Example() {
} }
func testHandler(w http.ResponseWriter, r *http.Request) { func testHandler(w http.ResponseWriter, r *http.Request) {
w.WriteHeader(http.StatusOK)
} }
func TestUUID(t *testing.T) { func TestUUID(t *testing.T) {