Standard library / log/slog
slog.Value.Int64()
Return the represented Int64 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) Int64() int64Return Value
int64
Return the represented Int64 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).Int64()) }