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