summaryrefslogtreecommitdiff
path: root/types
diff options
context:
space:
mode:
authorjwijenbergh <jeroenwijenbergh@protonmail.com>2024-02-06 14:43:06 +0100
committerJeroen Wijenbergh <46386452+jwijenbergh@users.noreply.github.com>2024-02-19 14:15:07 +0100
commit3fd29f3e1c963196cac69fcbb9d68116f7ea80ec (patch)
tree7cb586d304167e4198166ff17dc79d33122a75e5 /types
parent2337dcde60a710d2f65d3fe1107811202e34c633 (diff)
All: Prepare to get rid of go-errors/errors lib
Diffstat (limited to 'types')
-rw-r--r--types/cookie/cookie.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/types/cookie/cookie.go b/types/cookie/cookie.go
index e1cffca..55fe938 100644
--- a/types/cookie/cookie.go
+++ b/types/cookie/cookie.go
@@ -5,11 +5,11 @@
package cookie
import (
+ "fmt"
"context"
+ "errors"
"encoding/json"
"runtime/cgo"
-
- "github.com/go-errors/errors"
)
type Cookie struct {
@@ -47,7 +47,7 @@ func (c *Cookie) Receive(errchan chan error) (string, error) {
case e := <-errchan:
return "", e
case <-c.ctx.Done():
- return "", errors.WrapPrefix(context.Canceled, "receive cookie", 0)
+ return "", fmt.Errorf("receive cookie done: %w", context.Canceled)
}
}
@@ -65,7 +65,7 @@ func (c *Cookie) Cancel() error {
func (c *Cookie) Send(data string) error {
select {
case <-c.ctx.Done():
- return errors.WrapPrefix(context.Canceled, "send cookie", 0)
+ return fmt.Errorf("send cookie done: %w", context.Canceled)
default:
if c.c == nil {
return errors.New("channel is nil")