Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsPrintable ¶
func IsPrintable[T printableType](v T) string
Types ¶
type BufLogReadWriter ¶
func NewBufLogReadWriter ¶
func NewBufLogReadWriter(rw io.ReadWriter, logger *slog.Logger) *BufLogReadWriter
NewBufLogReadWriter creates a new BufLogReadWriter. It wraps a bufio.ReadWriter and logs all reads and writes to a slog.Logger. the reason to divide it in 2 structs is to avoid the need to implement all the methods of bufio.ReadWriter
type HttpResponseWriter ¶
type HttpResponseWriter struct { http.ResponseWriter // contains filtered or unexported fields }
func NewHttpResponseWriter ¶
func NewHttpResponseWriter(w http.ResponseWriter, logger *slog.Logger) *HttpResponseWriter
type LogReadWriter ¶
type LogReadWriter struct { ReadWriter io.ReadWriter // contains filtered or unexported fields }
LogReadWriter is a wrapper around a bufio.ReadWriter that logs all reads and writes to a slog.Logger.
func NewLogReadWriter ¶
func NewLogReadWriter(rw io.ReadWriter, logger *slog.Logger) *LogReadWriter
NewLogReadWriter creates a new LogReadWriter.
Click to show internal directories.
Click to hide internal directories.