Standard library / log/slog

slog.Int64Value()

Construct an unkeyed Int64 value for use in an attribute. Expected stdout: '2\n'.

Formal Syntax & Structure

go syntaxgo
func Int64Value(v int64) Value

Parameters & Attributes

NameTypeDescription
vint64Values to log or convert.

Return Value

Value

Construct an unkeyed Int64 value for use in an attribute.

Working Example

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