mirror of
https://github.com/zrepl/zrepl.git
synced 2025-08-09 23:17:35 +02:00
make vet happy: 'don't leak contexts'
This commit is contained in:
@ -41,7 +41,7 @@ func (l *Logger) log(level Level, msg string) {
|
||||
|
||||
entry := Entry{level, msg, time.Now(), l.fields}
|
||||
|
||||
ctx, _ := context.WithDeadline(context.Background(), time.Now().Add(l.outletTimeout))
|
||||
ctx, cancel := context.WithDeadline(context.Background(), time.Now().Add(l.outletTimeout))
|
||||
ech := make(chan error)
|
||||
|
||||
louts := l.outlets[level]
|
||||
@ -64,6 +64,8 @@ func (l *Logger) log(level Level, msg string) {
|
||||
}
|
||||
}
|
||||
|
||||
cancel() // make go vet happy
|
||||
|
||||
}
|
||||
|
||||
func (l *Logger) WithField(field string, val interface{}) *Logger {
|
||||
|
Reference in New Issue
Block a user