I'm building golang lambda functions using the serverless framework in AWS CodeBuild. This project is in a private bitbucket repository. And the CodeBuild source is the bitbucket repo
I'm having some problems of using local packages in the code.
I have this project structure
hello
test
test.go
main.go
serverless.yml
...other files
what I'm trying to do is to use package test
in hello/test/test.go
in the hello/main.go
.
And I've tried 2 options.
dep ensure
. Moving test
to another project.the problems:
/....aws path/bitbucket.org/<username>/<repo>/
and the $GOPATH
is /...aws path/
.So, what can I do to use my golang packages in AWS CodeBuild? And it's a private repo not a public one.
Based on Peter's comments, I resolved the issue by using the full path of my bitbucket repo in my $GOPATH/src.
so the path should be bitbucket.org/<username>/<repo>