Standard library / log/slog
slog.GroupValue()
Construct an unkeyed Group value for use in an attribute. Expected stdout: '[n=2]\n'.
Formal Syntax & Structure
go syntaxgo
func GroupValue(as ...Attr) ValueParameters & Attributes
| Name | Type | Description |
|---|---|---|
| as | ...Attr | Input to the operation as described above. |
Return Value
Value
Construct an unkeyed Group value for use in an attribute.
Working Example
Example Snippetgo
package main
import ( "fmt" "log/slog")
func main() { fmt.Println(slog.GroupValue(slog.Int("n", 2))) }