slogstringlevel

package module
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 18, 2025 License: MIT Imports: 1 Imported by: 0

README

slogstringlevel

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL