Decompiling a compiled program with Go

Chandra Nakka picture Chandra Nakka · Jul 30, 2014 · Viewed 37k times · Source

I have built a simple executable program with Go.

I've compiled the code into a static binary program.

I want to decompile the output binary file and get the Go source code.

Is this possible or not?

Answer

fuz picture fuz · Jul 30, 2014

There is no tool to do that and as Go programs are compiled into machine code, they do not contain enough information to translate them back into Go code. Standard disassembly techniques are still possible though.