summaryrefslogtreecommitdiff
path: root/internal/fsm/fsm.go
diff options
context:
space:
mode:
authorjwijenbergh <jeroenwijenbergh@protonmail.com>2022-11-24 15:40:39 +0100
committerjwijenbergh <jeroenwijenbergh@protonmail.com>2022-11-24 15:40:39 +0100
commit8be555e5f91c6069c3d51cb014f1849fd182b1dc (patch)
tree9c78f2ee1f5122da1e1ed3e452682f7f6744778f /internal/fsm/fsm.go
parent791fffebff4499e4fad3217e2160596e1b8b3eea (diff)
Style: Use stylecheck and fix errors
Diffstat (limited to 'internal/fsm/fsm.go')
-rw-r--r--internal/fsm/fsm.go14
1 files changed, 7 insertions, 7 deletions
diff --git a/internal/fsm/fsm.go b/internal/fsm/fsm.go
index 1b45ce8..b51a5c9 100644
--- a/internal/fsm/fsm.go
+++ b/internal/fsm/fsm.go
@@ -75,8 +75,8 @@ func (fsm *FSM) InState(check FSMStateID) bool {
}
func (fsm *FSM) HasTransition(check FSMStateID) bool {
- for _, transition_state := range fsm.States[fsm.Current].Transitions {
- if transition_state.To == check {
+ for _, transitionState := range fsm.States[fsm.Current].Transitions {
+ if transitionState.To == check {
return true
}
}
@@ -143,12 +143,12 @@ func (fsm *FSM) GoTransition(newState FSMStateID) bool {
func (fsm *FSM) generateMermaidGraph() string {
graph := "graph TD\n"
- sorted_fsm := make(FSMStateIDSlice, 0, len(fsm.States))
- for state_id := range fsm.States {
- sorted_fsm = append(sorted_fsm, state_id)
+ sortedFSM := make(FSMStateIDSlice, 0, len(fsm.States))
+ for stateID := range fsm.States {
+ sortedFSM = append(sortedFSM, stateID)
}
- sort.Sort(sorted_fsm)
- for _, state := range sorted_fsm {
+ sort.Sort(sortedFSM)
+ for _, state := range sortedFSM {
transitions := fsm.States[state].Transitions
for _, transition := range transitions {
if state == fsm.Current {