Skip to content

Commit 03b3cff

Browse files
authored
fix package doc formatting (#29)
1 parent fadd83c commit 03b3cff

1 file changed

Lines changed: 8 additions & 6 deletions

File tree

doc.go

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -88,13 +88,15 @@ The Attr variants are recommended for production use as they provide:
8888
8989
- Better IDE support: autocompletion and type checking
9090
91-
// Variadic - convenient but less performant
92-
logger.Info(ctx, "user.created", "user_id", 12345, "email", "user@example.com")
91+
Examples:
9392
94-
// Attr - more performant and type-safe
95-
logger.InfoAttr(ctx, "user.created",
96-
log.Int("user_id", 12345),
97-
log.String("email", "user@example.com"))
93+
// Variadic - convenient but less performant
94+
logger.Info(ctx, "user.created", "user_id", 12345, "email", "user@example.com")
95+
96+
// Attr - more performant and type-safe
97+
logger.InfoAttr(ctx, "user.created",
98+
log.Int("user_id", 12345),
99+
log.String("email", "user@example.com"))
98100
99101
# Performance
100102

0 commit comments

Comments
 (0)