无法在travis中构建go项目

Can't build go project in travis

我开始创建一个非常轻量级的消息代理来在一个项目中练习 go、travis 和一些 aws 服务。

我目前的问题是我可以在我的本地机器上构建、运行 和测试我的开发分支,但是当 travis 尝试构建它时,我得到一个编译错误。它不喜欢的代码直接来自 AWS 示例,进一步加深了我的神秘感。

Travis 构建失败 https://travis-ci.org/hevnly/eevy/builds/65687886

Github 回购 https://github.com/hevnly/eevy/tree/92412cf729ed546d698ded1e514d2d54c340ff81

错误

handler/lambda.go:31: cannot use "github.com/awslabs/aws-sdk-go/aws".Config literal (type *"github.com/awslabs/aws-sdk-go/aws".Config) as type *"github.com/aws/aws-sdk-go/aws".Config in argument to lambda.New
handler/sqs.go:26: cannot use "github.com/awslabs/aws-sdk-go/aws".Config literal (type *"github.com/awslabs/aws-sdk-go/aws".Config) as type *"github.com/aws/aws-sdk-go/aws".Config in argument to sqs.New

代码示例 <code>svc := lambda.New(&aws.Config{Region: "eu-west-1"})

好的,我刚刚尝试 go get 你的回购并得到同样的错误:

handler/lambda.go:29: cannot use "github.com/awslabs/aws-sdk-go/aws".Config literal (type *"github.com/awslabs/aws-sdk-go/aws".Config) as type *"github.com/aws/aws-sdk-go/aws".Config in argument to lambda.New
handler/sqs.go:26: cannot use "github.com/awslabs/aws-sdk-go/aws".Config literal (type *"github.com/awslabs/aws-sdk-go/aws".Config) as type *"github.com/aws/aws-sdk-go/aws".Config in argument to sqs.New

我建议您开始使用依赖项管理器,这样您就可以在您的存储库中修复您的依赖项,并在任何地方进行可重现的构建。

我的推荐是 Godep,但还有其他推荐。