From 57d7084b743d16df8731923b40aca93202fd3c58 Mon Sep 17 00:00:00 2001 From: Neur0toxine Date: Wed, 18 Oct 2023 15:20:04 +0300 Subject: [PATCH] update HTTPStatus helper --- core/logger/attrs.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/logger/attrs.go b/core/logger/attrs.go index 6e802c8..a8cc17b 100644 --- a/core/logger/attrs.go +++ b/core/logger/attrs.go @@ -24,6 +24,6 @@ func ErrAttr(err any) slog.Attr { return slog.Any(ErrorAttr, err) } -func HTTPStatus(code int) (slog.Attr, slog.Attr) { - return slog.Int(HTTPStatusAttr, code), slog.String(HTTPStatusNameAttr, http.StatusText(code)) +func HTTPStatus(code int) []any { + return []any{slog.Int(HTTPStatusAttr, code), slog.String(HTTPStatusNameAttr, http.StatusText(code))} }