Skip to content

Commit e6ac2a0

Browse files
committed
Fix errors.Is argument order in daemon.go
- Correct the argument order for errors.Is() calls from errors.Is(context.Canceled, err) to errors.Is(err, context.Canceled) - Fixes SA1032: arguments have the wrong order warnings
1 parent 070d45c commit e6ac2a0

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

loopd/daemon.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -892,7 +892,7 @@ func (d *Daemon) initialize(withMacaroonService bool) error {
892892
defer infof("Static address manager stopped")
893893

894894
err := staticAddressManager.Run(d.mainCtx, initChan)
895-
if err != nil && !errors.Is(context.Canceled, err) {
895+
if err != nil && !errors.Is(err, context.Canceled) {
896896
d.internalErrChan <- err
897897
}
898898
}()
@@ -924,7 +924,7 @@ func (d *Daemon) initialize(withMacaroonService bool) error {
924924
defer infof("Static address deposit manager stopped")
925925

926926
err := depositManager.Run(d.mainCtx, initChan)
927-
if err != nil && !errors.Is(context.Canceled, err) {
927+
if err != nil && !errors.Is(err, context.Canceled) {
928928
d.internalErrChan <- err
929929
}
930930
}()
@@ -956,7 +956,7 @@ func (d *Daemon) initialize(withMacaroonService bool) error {
956956
defer infof("Static address withdrawal manager stopped")
957957

958958
err := withdrawalManager.Run(d.mainCtx, initChan)
959-
if err != nil && !errors.Is(context.Canceled, err) {
959+
if err != nil && !errors.Is(err, context.Canceled) {
960960
d.internalErrChan <- err
961961
}
962962
}()
@@ -992,7 +992,7 @@ func (d *Daemon) initialize(withMacaroonService bool) error {
992992
infof("Starting static address loop-in manager...")
993993
defer infof("Static address loop-in manager stopped")
994994
err := staticLoopInManager.Run(d.mainCtx, initChan)
995-
if err != nil && !errors.Is(context.Canceled, err) {
995+
if err != nil && !errors.Is(err, context.Canceled) {
996996
d.internalErrChan <- err
997997
}
998998
}()

0 commit comments

Comments
 (0)