Standard library / log/slog
slog.Value.Float64()
Return the represented Float64 value; typed accessors require the appropriate Kind (String and Any have broader behavior). Expected stdout: '1.5\n'.
Formal Syntax & Structure
go syntaxgo
func (v Value) Float64() float64Return Value
float64
Return the represented Float64 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.Float64Value(1.5).Float64()) }