When you pulled out oid into a separate package, it broke go get github.com/lib/pq. The import path should not be pq/oid, but rather github.com/lib/pq following the Remote import path syntax ( http://golang.org/cmd/go/ )