I'm deploying a web app to Heroku for the first time. I'm trying to use the crypto/bcrypt package which lives in vendor, but I get the message:
remote: util/hashing.go:3:8: cannot find package "github.com/crypto/bcrypt" in any of:
remote: /tmp/tmp.3EDUSKHNhV/.go/src/manager/vendor/github.com/crypto/bcrypt (vendor tree)
remote: /app/tmp/cache/go1.12.1/go/src/github.com/crypto/bcrypt (from $GOROOT)
remote: /tmp/tmp.3EDUSKHNhV/.go/src/github.com/crypto/bcrypt (from $GOPATH)
remote: ! Push rejected, failed to compile Go app.
I'm using Glide as my dependency manager.
I have git cloned https://github.com/golang/crypto in vendor and reference it as
import "github.com/crypto/bcrypt"
in my Go files (which works fine).
I've tried importing it as a submodule, but this gives the same result.
My glide.yaml file:
package: fifa_manager
import:
- package: github.com/go-sql-driver/mysql
- package: github.com/gorilla/securecookie
- package: github.com/golang/crypto/bcrypt
When I glide install
, the crypto
directory in vendor/github.com
is removed.
I expected the package to be installed (as the other dependencies are) - instead, the package is not found and I cannot build.