-
Notifications
You must be signed in to change notification settings - Fork 156
Open
Labels
Description
Currently if cmdAdd function fails, we rely on top level err error variable to determine if cleanup needs to occur via defer statements [1]
This is brittle as err variable may be re-declared in inner-scope masking it and in case of error in inner scope causing the deferred functions to behave in an un-desirable manner (essentially do nothing)
we should come up with a better mechanism for cleanup. it might not look pretty but it should be more robust.
[1]
Line 113 in 2aea1bb
| defer func() { |
zeeke