Standard library / log/slog
slog.Float64Value()
Construct an unkeyed Float64 value for use in an attribute. Expected stdout: '1.5\n'.
Formal Syntax & Structure
go syntaxgo
func Float64Value(v float64) ValueParameters & Attributes
| Name | Type | Description |
|---|---|---|
| v | float64 | Values to log or convert. |
Return Value
Value
Construct an unkeyed Float64 value for use in an attribute.
Working Example
Example Snippetgo
package main
import ( "fmt" "log/slog")
func main() { fmt.Println(slog.Float64Value(1.5)) }