title: How to use/distribute a binary package without Go source code
body: <p>Basically my folder structure is as below:</p>
  
  <pre><code>bin/               
  pkg/
      linux_amd64/         
          github.com/user/
              stringutil.a  
  src/
      github.com/user/
          hello/
              hello.go   (main file)  
          stringutil/
              stringutil.go
  </code></pre>
  
  <p><code>hello.go</code> is the main program that imports some function from <code>stringutil.go</code>.</p>
  
  <p>After running <code>go install</code>, <code>stringutil.a</code> is created under <code>pkg</code> (as above).</p>
  
  <p>My question is, can I run <code>go install</code> again without <code>stringutil.go</code> source since I already have <code>stringutil.a</code>?</p>
  
  <p>I'm a Java programmer and new to Go. Usually in Java, during compilation, we can import the compiled jar file to the classpath and do compilation.</p>
  
  <p>How can I do the same thing in Go? If I have a compiled package, <code>stringutil.a</code>, how can I distribute this file to someone and let them use it without exposing the original source code?</p>