mirror of
https://github.com/retailcrm/mg-transport-core.git
synced 2024-11-21 20:56:04 +03:00
update HTTPStatus helper
This commit is contained in:
parent
4c1f29ba01
commit
57d7084b74
@ -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))}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user