Cover page by David Chisnall

Safari, the world’s most comprehensive technology and business learning platform.

Find the exact information you need to solve a problem on the fly, or go deeper to master the technologies and skills you need to succeed

Start Free Trial

No credit card required

O'Reilly logo

16. Distributing Go Code

After you’ve written some Go code, there is a good chance that you are going to want other people to be able to use it. Because Go is statically compiled, you can distribute binary packages just as you would distribute code written in C, or any other statically compiled language.

1  $ otool -L 6.out2  6.out:3    /usr/lib/libSystem.B.dylib

Output from: otool

Programs compiled by Gc are statically linked, so you can just distribute the output from 6l without worrying about any other libraries. If you are distributing code—especially packages—in source form, then Go provides a few helper utilities to make your life a bit easier.

Installing Third-Party Packages

Find the exact information you need to solve a problem on the fly, or go deeper to master the technologies and skills you need to succeed

Start Free Trial

No credit card required