From b57a91bda593f645195ae0955ef8c157a04a0dbb Mon Sep 17 00:00:00 2001 From: Marvin Preuss Date: Mon, 17 Jan 2022 11:28:17 +0100 Subject: [PATCH] test: write at least status code in example --- logginghandler_test.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/logginghandler_test.go b/logginghandler_test.go index f33cf0b..416f2b5 100644 --- a/logginghandler_test.go +++ b/logginghandler_test.go @@ -18,6 +18,8 @@ func Example() { logger := logginghandler.Logger(r) logger.Info().Msg("this is a request") + + w.WriteHeader(http.StatusOK) })) http.Handle("/", handler) @@ -25,6 +27,7 @@ func Example() { } func testHandler(w http.ResponseWriter, r *http.Request) { + w.WriteHeader(http.StatusOK) } func TestUUID(t *testing.T) {