]> Cypherpunks.ru repositories - gostls13.git/blobdiff - src/log/slog/doc.go
log/slog: Group takes ...any
[gostls13.git] / src / log / slog / doc.go
index 205c40de90607fdade25d4e01026f89e22779ef9..57f83bb52dc4195a2383ef34b49cfdfe4873e321 100644 (file)
@@ -164,11 +164,11 @@ How this qualification is displayed depends on the handler.
 [TextHandler] separates the group and attribute names with a dot.
 [JSONHandler] treats each group as a separate JSON object, with the group name as the key.
 
-Use [Group] to create a Group Attr from a name and a list of Attrs:
+Use [Group] to create a Group Attr from a name and a list of key-value pairs:
 
        slog.Group("request",
-           slog.String("method", r.Method),
-           slog.Any("url", r.URL))
+           "method", r.Method,
+           "url", r.URL)
 
 TextHandler would display this group as