Lurker News

Comments (229) 38 threads

Show all comments

Showing thread 17 of 38

mehrdadn1 reply#
'Go' question that came up when I tried to build this: How do you build a Go .EXE on Windows that doesn't have any file paths embedded in it?
mehrdadn1 reply#
Did you try this yourself? Because I already tried it and it didn't work. Remember I said I'm on Windows.
mappu3 replies#
Yes, we do this for our release builds, including Windows. It does only remove the leading prefix (GOPATH) from panics, not the full file path.

I don't think there's a way to remove the whole file paths other than replacing strings in the compiled binary. In our case GOPATH was the only sensitive part (since function names can't be removed either, for reflection to work).
We also couple it with a defer handler to obfuscate panic traces.

Continue this thread — 3 replies