Go 'Can't Find Import'
dependency-management, go
Solution
github.com/heroku/log-shuttle is a `main` package, not an importable library, meaning it's meant to be compiled and run as a binary.
Problem
I'm attempting to incorporate Heroku's `log-shuttle` library (https://github.com/heroku/log-shuttle) into a Go project I'm working on. The tool is primarily designed to be run as an independent binary, but I'm hoping to integrate it in a different way in my tool. So I get the library: ``` $ go get github.com/heroku/log-shuttle $ ls $GOPATH/src/github.com/heroku/log-shuttle/ batcher.go Godeps ... ... ``` which returns successfully. Then I try to import the library: ``` package myPackage import ( "github.com/heroku/log-shuttle" "fmt" "log" ) ... ``` Great. But now I go to `go build` and... ``` $ go build # github.com/<my project> logWriter/log_shuttle_writer.go:5: can't find import: "github.com/heroku/log-shuttle" ``` I have my `GOPATH` set correctly (I believe): ``` $ go env GOARCH="amd64" GOBIN="" GOCHAR="6" GOEXE="" GOHOSTARCH="amd64" GOHOSTOS="linux" GOOS="linux" GOPATH="/home/jeff/go/" GORACE="" GOROOT="/usr/lib/go" GOTOOLDIR="/usr/lib/go/pkg/tool/linux_amd64" TERM="dumb" CC="gcc" GOGCCFLAGS="-g -O2 -fPIC -m64 -pthread" CXX="g++" CGO_ENABLED="1" ``` And the package is installed and built, but it doesn't want to import. As you can see, there are non non-ASCII chars in the package path (though the hyphen is non-alpha-numeric), and I can't find any more info about what could be causing this problem. Not sure how it would matter, but I am using `godep` to try to manage my dependencies. Thanks in advance.