summaryrefslogtreecommitdiff
path: root/wsmsg_hello.go
diff options
context:
space:
mode:
Diffstat (limited to 'wsmsg_hello.go')
-rw-r--r--wsmsg_hello.go8
1 files changed, 3 insertions, 5 deletions
diff --git a/wsmsg_hello.go b/wsmsg_hello.go
index f0bc191..f7a984c 100644
--- a/wsmsg_hello.go
+++ b/wsmsg_hello.go
@@ -22,7 +22,6 @@ package main
import (
"context"
- "fmt"
"strings"
"sync/atomic"
@@ -41,8 +40,7 @@ func messageHello(
select {
case <-ctx.Done():
- return fmt.Errorf(
- "%w: %w",
+ return wrapError(
errContextCancelled,
ctx.Err(),
)
@@ -65,12 +63,12 @@ func messageHello(
if atomic.LoadUint32(&state) == 2 {
err = writeText(ctx, c, "START")
if err != nil {
- return fmt.Errorf("%w: %w", errCannotSend, err)
+ return wrapError(errCannotSend, err)
}
}
err = writeText(ctx, c, "HI :"+strings.Join(courseIDs, ","))
if err != nil {
- return fmt.Errorf("%w: %w", errCannotSend, err)
+ return wrapError(errCannotSend, err)
}
return nil