When methods are used as actions calling .ToGraph() generates an invalid DOT file with incorrect string quoting for the method name.
It's easy to reproduce the issue with the code in https://go.dev/play/p/SVJBbhx760k, the DOT output contains the following line which has too many double quotes:
initial [label="initial|entry / "method-fm""];
Trying to call dot with this output causes the following error:
$ dot -Tsvg ./a.dot
Error: ./a.dot: syntax error in line 6 near '-'
I can try following up with a PR latter but I'm afraid I'm not well-versed in DOT format and all the possible quoting rules.
When methods are used as actions calling
.ToGraph()
generates an invalid DOT file with incorrect string quoting for the method name.It's easy to reproduce the issue with the code in https://go.dev/play/p/SVJBbhx760k, the DOT output contains the following line which has too many double quotes:
Trying to call dot with this output causes the following error:
I can try following up with a PR latter but I'm afraid I'm not well-versed in DOT format and all the possible quoting rules.