Documentation ¶
Index ¶
Constants ¶
View Source
const ( Tape = "tape" Text = "text" Json = "json" )
Variables ¶
This section is empty.
Functions ¶
func NewTapeHandler ¶
NewTapeHandler creates a tape handler with w and opts. This handler is more readable and faster than slog's handlers.
func Register ¶
func Register(name string, newHandler NewHandlerFunc) error
Register registers newHandler with name.
Types ¶
type NewHandlerFunc ¶
NewHandlerFunc is a function for creating slog.Handler with w and opts.
func Get ¶
func Get(name string) (NewHandlerFunc, error)
Get gets new handler func with name and returns an error if failed.
Click to show internal directories.
Click to hide internal directories.