Skip to content

Commit 958f7eb

Browse files
committed
Revert "Merge pull request #86 from cdr/sink-context-iface"
This reverts commit e88ff39, reversing changes made to 95bc0f1.
1 parent fa507d2 commit 958f7eb

File tree

1 file changed

+3
-9
lines changed

1 file changed

+3
-9
lines changed

context.go

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,21 +4,15 @@ import "context"
44

55
type loggerCtxKey = struct{}
66

7-
type sinkContext struct {
8-
context.Context
9-
Sink
10-
}
11-
12-
// SinkContext is a context that implements Sink.
13-
// It may be returned by log creators to allow for composition.
14-
type SinkContext interface {
7+
// SinkContext is used by slog.Make to compose many loggers together.
8+
type SinkContext struct {
159
Sink
1610
context.Context
1711
}
1812

1913
func contextWithLogger(ctx context.Context, l logger) SinkContext {
2014
ctx = context.WithValue(ctx, loggerCtxKey{}, l)
21-
return &sinkContext{
15+
return SinkContext{
2216
Context: ctx,
2317
Sink: l,
2418
}

0 commit comments

Comments
 (0)