diff options
| author | jwijenbergh <jeroenwijenbergh@protonmail.com> | 2022-09-20 13:21:34 +0200 |
|---|---|---|
| committer | jwijenbergh <jeroenwijenbergh@protonmail.com> | 2022-09-20 13:21:34 +0200 |
| commit | 25d2143a627531fc0475d639c1e8f657ccafa630 (patch) | |
| tree | 3b5b69b64f5f6879810842464056543e315c64a4 /fsm.go | |
| parent | b0e4e454fc94935cf8ee3282a07596ec53268a18 (diff) | |
Golang-ci-lint: Fixes
Diffstat (limited to 'fsm.go')
| -rw-r--r-- | fsm.go | 20 |
1 files changed, 8 insertions, 12 deletions
@@ -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), ), } } |
