Documentation
¶
Overview ¶
Package slogstringlevel provides a string that implements slog.Leveler. Useful for unmarshalling from a string value in a config (e.g. via spf13/viper).
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type SlogStringLevel ¶
type SlogStringLevel string
SlogStringLevel is a string that implements slog.Leveler.
const ( LevelDebug SlogStringLevel = "debug" LevelInfo SlogStringLevel = "info" LevelWarn SlogStringLevel = "warn" LevelError SlogStringLevel = "error" )
func (SlogStringLevel) Level ¶
func (l SlogStringLevel) Level() slog.Level
Level returns the slog.Level corresponding to the SlogStringLevel.
Click to show internal directories.
Click to hide internal directories.