Closed exegeteio closed 2 months ago
Hi @exegeteio, it’s default Go behaviour to include the source paths in stack traces during a panic. I don’t think it’s really a problem in this case, but I agree it can be surprising.
I’ll update the makefile to trim those paths out of the release builds (there’s a compiler flag to do that). Thanks for bringing this up!
But if anyone has suggestions of what to Google for, I'd love to contribute a PR.
Oops sorry, missed that part on first read! If you fancy taking a stab at this, take a look at the -trimpath
flag for go build
. I think we’ll want to add that in the Makefile. The dist
target is what’s used to make release builds.
@exegeteio I've also added #22, for the related issue that we shouldn't be showing a stack trace in this situation anyway (regardless of what's in that stack trace).
It appears that the folder on @kevinmcconnell 's machine where the app was built is being output when the go app errors out: