aboutsummaryrefslogtreecommitdiffstats
path: root/worker/types/thread.go
diff options
context:
space:
mode:
Diffstat (limited to 'worker/types/thread.go')
-rw-r--r--worker/types/thread.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/worker/types/thread.go b/worker/types/thread.go
index d37d2067..9f59e9e6 100644
--- a/worker/types/thread.go
+++ b/worker/types/thread.go
@@ -42,7 +42,7 @@ func (t *Thread) insertCmp(child *Thread, cmp func(*Thread, *Thread) bool) {
func (t *Thread) Walk(walkFn NewThreadWalkFn) error {
err := newWalk(t, walkFn, 0, nil)
- if err == ErrSkipThread {
+ if errors.Is(err, ErrSkipThread) {
return nil
}
return err
@@ -80,7 +80,7 @@ func newWalk(node *Thread, walkFn NewThreadWalkFn, lvl int, ce error) error {
}
for child := node.FirstChild; child != nil; child = child.NextSibling {
err = newWalk(child, walkFn, lvl+1, err)
- if err == ErrSkipThread {
+ if errors.Is(err, ErrSkipThread) {
err = nil
continue
} else if err != nil {