Skip to content

Commit a93630c

Browse files
committed
Uncomment testlog example
1 parent 613aaab commit a93630c

File tree

1 file changed

+20
-18
lines changed

1 file changed

+20
-18
lines changed

examples_test.go

Lines changed: 20 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ import (
44
"context"
55
"go.coder.com/slog"
66
"go.coder.com/slog/stderrlog"
7+
"go.coder.com/slog/testlog"
8+
"testing"
79
)
810

911
func Example_stderr() {
@@ -23,21 +25,21 @@ func Example_stderr() {
2325
)
2426
}
2527

26-
// func Example_test() {
27-
// // Nil here but would be provided by the testing framework.
28-
// var t *testing.T
29-
//
30-
// testlog.Info(t, "my message here",
31-
// "field_name", "something or the other",
32-
// "some_map", map[string]interface{}{
33-
// "nested_fields": "wowow",
34-
// },
35-
// "some slice", []interface{}{
36-
// 1,
37-
// "foof",
38-
// "bar",
39-
// true,
40-
// },
41-
// log.Component, "test",
42-
// )
43-
// }
28+
func Example_test() {
29+
// Nil here but would be provided by the testing framework.
30+
var t *testing.T
31+
32+
testlog.Info(t, "my message here",
33+
"field_name", "something or the other",
34+
"some_map", map[string]interface{}{
35+
"nested_fields": "wowow",
36+
},
37+
"some slice", []interface{}{
38+
1,
39+
"foof",
40+
"bar",
41+
true,
42+
},
43+
slog.Component("test"),
44+
)
45+
}

0 commit comments

Comments
 (0)