ondrajz / go-callvis

Visualize call graph of a Go program using Graphviz
https://ofabry.github.io/go-callvis
MIT License
5.82k stars 402 forks source link

Temporary SVG file cannot be rewritten on Windows #183

Open AndrewWPhillips opened 2 months ago

AndrewWPhillips commented 2 months ago

The 2nd time I run go-callvis I get this error:

...
2024/05/01 13:38:54 converting dot to svg..
2024/05/01 13:38:54 Could not open "L:\TEMP\go-callvis_export.svg" for writing : Invalid argument

I have seen this before where opening a file for write fails. (I believe this is an issue with io package on Windows but have not had a chance to investigate.) The workaround is to delete the file before trying to write it.

$ go version go version go1.21.6 windows/amd64