From afe0a90487be1a209cd32ac1f72d901fa832a9b7 Mon Sep 17 00:00:00 2001 From: "Alexander A. Klimov" Date: Fri, 28 May 2021 14:18:43 +0200 Subject: [PATCH] s/CondClosed/ErrCondClosed/ --- pkg/com/cond.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkg/com/cond.go b/pkg/com/cond.go index a70bf3f1..63ef1950 100644 --- a/pkg/com/cond.go +++ b/pkg/com/cond.go @@ -5,7 +5,7 @@ import ( "errors" ) -var CondClosed = errors.New("condition closed") +var ErrCondClosed = errors.New("condition closed") // Cond implements a condition variable, a rendezvous point // for goroutines waiting for or announcing the occurrence @@ -64,7 +64,7 @@ func (c *Cond) Wait() <-chan struct{} { case l := <-c.listeners: return l case <-c.ctx.Done(): - panic(CondClosed) + panic(ErrCondClosed) } } @@ -73,7 +73,7 @@ func (c *Cond) Broadcast() { select { case c.broadcast <- struct{}{}: case <-c.ctx.Done(): - panic(CondClosed) + panic(ErrCondClosed) } }