Update golanci-lint

This commit is contained in:
9seconds
2021-04-09 14:35:04 +03:00
parent 81bca75c25
commit 585ebfeb50
32 changed files with 101 additions and 75 deletions
+5 -1
View File
@@ -18,7 +18,11 @@ var relayPool = sync.Pool{
func AcquireRelay(ctx context.Context, logger Logger, bufferSize int, idleTimeout time.Duration) *Relay {
ctx, cancel := context.WithCancel(ctx)
r := relayPool.Get().(*Relay)
r, ok := relayPool.Get().(*Relay)
if !ok {
panic("Relay pool has no relay!")
}
r.ctx = ctx
r.ctxCancel = cancel
r.logger = logger