summaryrefslogtreecommitdiff
path: root/fsm.go
diff options
context:
space:
mode:
authorjwijenbergh <jeroenwijenbergh@protonmail.com>2022-09-20 13:21:34 +0200
committerjwijenbergh <jeroenwijenbergh@protonmail.com>2022-09-20 13:21:34 +0200
commit25d2143a627531fc0475d639c1e8f657ccafa630 (patch)
tree3b5b69b64f5f6879810842464056543e315c64a4 /fsm.go
parentb0e4e454fc94935cf8ee3282a07596ec53268a18 (diff)
Golang-ci-lint: Fixes
Diffstat (limited to 'fsm.go')
-rw-r--r--fsm.go20
1 files changed, 8 insertions, 12 deletions
diff --git a/fsm.go b/fsm.go
index 75a2d8c..b508e6c 100644
--- a/fsm.go
+++ b/fsm.go
@@ -222,12 +222,10 @@ type FSMWrongStateTransitionError struct {
func (e FSMWrongStateTransitionError) CustomError() *types.WrappedErrorMessage {
return &types.WrappedErrorMessage{
Message: "Wrong FSM transition",
- Err: errors.New(
- fmt.Sprintf(
- "wrong FSM state, got: %s, want: a state with a transition to: %s",
- GetStateName(e.Got),
- GetStateName(e.Want),
- ),
+ Err: fmt.Errorf(
+ "wrong FSM state, got: %s, want: a state with a transition to: %s",
+ GetStateName(e.Got),
+ GetStateName(e.Want),
),
}
}
@@ -240,12 +238,10 @@ type FSMWrongStateError struct {
func (e FSMWrongStateError) CustomError() *types.WrappedErrorMessage {
return &types.WrappedErrorMessage{
Message: "Wrong FSM State",
- Err: errors.New(
- fmt.Sprintf(
- "wrong FSM state, got: %s, want: %s",
- GetStateName(e.Got),
- GetStateName(e.Want),
- ),
+ Err: fmt.Errorf(
+ "wrong FSM state, got: %s, want: %s",
+ GetStateName(e.Got),
+ GetStateName(e.Want),
),
}
}