title: Go build: "Cannot find package" (even though GOPATH is set)
body: <p>Even though I have <code>GOPATH</code> properly set, I still can't get "go build" or "go run" to find my own packages. What am I doing wrong?</p>
  
  <pre><code>$ echo $GOROOT
  /usr/local/go
  
  $ echo $GOPATH
  /home/mitchell/go
  
  $ cat ~/main.go
  package main
  import "foobar"
  func main() { }
  
  $ cat /home/mitchell/go/src/foobar.go
  package foobar
  
  $ go build main.go
  main.go:3:8: import "foobar": cannot find package
  </code></pre>