Standard library / log/slog

slog.Value.Uint64()

Return the represented Uint64 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) Uint64() uint64

Return Value

uint64

Return the represented Uint64 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.Uint64Value(2).Uint64()) }
Go Reference