Standard library / log/slog

slog.Value.Any()

Return the represented Any value; typed accessors require the appropriate Kind (String and Any have broader behavior). Expected stdout: '2\n'.

Formal Syntax & Structure

go syntaxgo
func (v Value) Any() any

Return Value

any

Return the represented Any value; typed accessors require the appropriate Kind (String and Any have broader behavior).

Working Example

Example Snippetgo
package main
import (  "fmt"  "log/slog")
func main() { fmt.Println(slog.IntValue(2).Any()) }
Go Reference