Standard library / log/slog
slog.LevelVar.String()
Return the diagnostic string for the level variable. Expected stdout: 'LevelVar(INFO)\n'.
Formal Syntax & Structure
go syntaxgo
func (v *LevelVar) String() stringReturn Value
string
Return the diagnostic string for the level variable.
Working Example
Example Snippetgo
package main
import ( "fmt" "log/slog")
func main() { var l slog.LevelVar; fmt.Println(l.String()) }