Standard library / log/slog
slog.Value
Compact representation of a structured logging value. Expected stdout: 'Int64 2\n'.
Formal Syntax & Structure
go syntaxgo
type Value struct {}Working Example
Example Snippetgo
package main
import ( "fmt" "log/slog")
func main() { var v slog.Value = slog.IntValue(2); fmt.Println(v.Kind(), v.Int64()) }