summaryrefslogtreecommitdiff
path: root/internal/fsm
diff options
context:
space:
mode:
authorjwijenbergh <jeroenwijenbergh@protonmail.com>2024-02-06 14:43:06 +0100
committerJeroen Wijenbergh <46386452+jwijenbergh@users.noreply.github.com>2024-02-19 14:15:07 +0100
commit3fd29f3e1c963196cac69fcbb9d68116f7ea80ec (patch)
tree7cb586d304167e4198166ff17dc79d33122a75e5 /internal/fsm
parent2337dcde60a710d2f65d3fe1107811202e34c633 (diff)
All: Prepare to get rid of go-errors/errors lib
Diffstat (limited to 'internal/fsm')
-rw-r--r--internal/fsm/fsm.go7
1 files changed, 2 insertions, 5 deletions
diff --git a/internal/fsm/fsm.go b/internal/fsm/fsm.go
index c7ae104..1b38e3a 100644
--- a/internal/fsm/fsm.go
+++ b/internal/fsm/fsm.go
@@ -7,8 +7,6 @@ import (
"os"
"path"
"sort"
-
- "github.com/go-errors/errors"
)
type (
@@ -108,7 +106,7 @@ func (fsm *FSM) CheckTransition(desired StateID) error {
return nil
}
}
- return errors.Errorf("fsm invalid transition attempt from '%s' to '%s'", fsm.GetStateName(fsm.Current), fsm.GetStateName(desired))
+ return fmt.Errorf("fsm invalid transition attempt from '%s' to '%s'", fsm.GetStateName(fsm.Current), fsm.GetStateName(desired))
}
// graphFilename gets the full path to the graph filename including the .graph extension.
@@ -146,7 +144,7 @@ func (fsm *FSM) GoTransitionRequired(newState StateID, data interface{}) error {
}
// transition is not handled
if !handled {
- return errors.Errorf("fsm failed transition from '%v' to '%v', is this required transition handled?", fsm.GetStateName(oldState), fsm.GetStateName(newState))
+ return fmt.Errorf("fsm failed transition from '%s' to '%s', is this required transition handled?", fsm.GetStateName(oldState), fsm.GetStateName(newState))
}
return nil
}
@@ -163,7 +161,6 @@ func (fsm *FSM) GoTransitionWithData(newState StateID, data interface{}) (bool,
if fsm.Generate {
fsm.writeGraph()
}
-
return fsm.StateCallback(prev, newState, data), nil
}