diff options
Diffstat (limited to 'internal/fsm/fsm.go')
| -rw-r--r-- | internal/fsm/fsm.go | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/internal/fsm/fsm.go b/internal/fsm/fsm.go index b6048be..84b5f1b 100644 --- a/internal/fsm/fsm.go +++ b/internal/fsm/fsm.go @@ -5,7 +5,6 @@ package fsm import ( "fmt" "os" - "os/exec" "path" "sort" @@ -115,7 +114,6 @@ func (fsm *FSM) graphFilename(extension string) string { func (fsm *FSM) writeGraph() { gph := fsm.GenerateGraph() gf := fsm.graphFilename(".graph") - gif := fsm.graphFilename(".png") f, err := os.Create(gf) if err != nil { return @@ -124,12 +122,9 @@ func (fsm *FSM) writeGraph() { _ = f.Close() }() - _, err = f.WriteString(gph) - if err != nil { - cmd := exec.Command("mmdc", "-i", gf, "-o", gif, "--scale", "4") - // Generating is best effort - _ = cmd.Start() - } + // Writing the graph is best effort + // TODO: Return string instead, we do not want to write files in this library + _, _ = f.WriteString(gph) } // GoTransitionRequired transitions the state machine to a new state with associated state data 'data' |
