go build
accepts -ldflags
parameter which is passed down to go
linker.
Two of those flags that you can
provide are:
-w
toOmit the DWARF symbol table.
-s
toOmit the symbol table and debug information.
This can help when one wants to shrink the resultant binary size.
Visit https://golang.org/cmd/link for more details.