I am using Heroku's Golang buildpack to deploy a simple web app with the following structure
my-app/
handler/
user.go
session.go
vendor/
github.com/
golang.org/
main.go
Gopkg.toml
Gopkg.lock
Inside my main file, I imported my own handler
package
import (
"fmt"
"net/http"
"my-app/handler"
)
Heroku was not able to run go install on my project due the following error:
----> Using go1.9.3
----> Running: go install -v -tags heroku .
----> cannot find package "my-app/handler" in any of: ...
I can run go install
and my-app
without any problem locally. It seems to me that heroku does not recognize my internal project package.
I am using dep and I have the following configurations in my Gopkg.toml:
[metadata.heroku]
root-package = "github.com/mygithub/my-app"
go-version = "go1.9.3"
install = ["."]
ensure = "false"
What else do I need to do to deploy a Go app with internal package? Thanks.