diff options
author | 2023-04-29 17:44:20 +0100 | |
---|---|---|
committer | 2023-04-29 18:44:20 +0200 | |
commit | 68b91d2128c7be3c4f060091b172c39057318ad4 (patch) | |
tree | 3bcf4af8fa79b43f56857df4bba1453977fa01b3 /vendor/codeberg.org/gruf/go-errors/v2/value.go | |
parent | [feature] Add GET endpoint for single notification (#1719) (diff) | |
download | gotosocial-68b91d2128c7be3c4f060091b172c39057318ad4.tar.xz |
[performance] tweak http client error handling (#1718)
* update errors library, check for more TLS type error in http client
Signed-off-by: kim <grufwub@gmail.com>
* bump cache library version to match errors library
Signed-off-by: kim <grufwub@gmail.com>
---------
Signed-off-by: kim <grufwub@gmail.com>
Diffstat (limited to 'vendor/codeberg.org/gruf/go-errors/v2/value.go')
-rw-r--r-- | vendor/codeberg.org/gruf/go-errors/v2/value.go | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/vendor/codeberg.org/gruf/go-errors/v2/value.go b/vendor/codeberg.org/gruf/go-errors/v2/value.go index 6a1f64451..6d7ec3a25 100644 --- a/vendor/codeberg.org/gruf/go-errors/v2/value.go +++ b/vendor/codeberg.org/gruf/go-errors/v2/value.go @@ -1,5 +1,7 @@ package errors +import "errors" + // WithValue wraps err to store given key-value pair, accessible via Value() function. func WithValue(err error, key any, value any) error { if err == nil { @@ -16,7 +18,7 @@ func WithValue(err error, key any, value any) error { func Value(err error, key any) any { var e *errWithValue - if !As(err, &e) { + if !errors.As(err, &e) { return nil } @@ -47,7 +49,7 @@ func (e *errWithValue) Value(key any) any { return e.val } - if !As(e.err, &e) { + if !errors.As(e.err, &e) { return nil } } |