Skip to content

Commit 505394e

Browse files
authored
README: fix example
[CI SKIP]
1 parent f79ab8a commit 505394e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -226,16 +226,16 @@ func (l *chanLogger) Write(m log.Messager) error {
226226

227227
func main() {
228228
log.New("channel", func(name string, vs ...interface{}) (log.Logger, error) {
229-
var cfg *chanLogger
229+
var cfg *chanConfig
230230
for i := range vs {
231231
switch v := vs[i].(type) {
232-
case chanLogger:
232+
case chanConfig:
233233
cfg = &v
234234
}
235235
}
236236

237237
if cfg == nil {
238-
return nil, fmt.Errorf("config object with the type '%T' not found", chanLogger{})
238+
return nil, fmt.Errorf("config object with the type '%T' not found", chanConfig{})
239239
} else if cfg.c == nil {
240240
return nil, errors.New("channel is nil")
241241
}

0 commit comments

Comments
 (0)