title: Build a go project from source
body: <p>How can I build a Go project from source, instead of using <code>go get domain.com/dir/project</code>? For example, instead of </p>
  
  <p><code>go get github.com/kr/godep</code></p>
  
  <p>I want to build from the source:</p>
  
  <pre><code>git clone https://github.com/kr/godep.git
  cd godep
  GOPATH=/tmp/godep go build
  </code></pre>
  
  <p>The commands above will result in</p>
  
  <pre><code>dep.go:4:2: cannot find package "code.google.com/p/go.tools/go/vcs" in any of:
      /usr/local/Cellar/go/1.2/libexec/src/pkg/code.google.com/p/go.tools/go/vcs (from $GOROOT)
      /Users/hanxue/Source/godep/godep/src/code.google.com/p/go.tools/go/vcs (from $GOPATH)
  save.go:5:2: cannot find package "github.com/kr/fs" in any of:
      /usr/local/Cellar/go/1.2/libexec/src/pkg/github.com/kr/fs (from $GOROOT)
      /Users/hanxue/Source/godep/godep/src/github.com/kr/fs (from $GOPATH)
  </code></pre>
  
  <p>Note: go 1.2 is installed in /usr/local/Cellar/go/1.2 with a link from <code>/usr/local/Cellar/go/1.2/bin/go</code> to <code>/usr/local/bin/go</code></p>