无法在travis中建立项目

时间:2015-06-06 13:55:11

标签: go travis-ci aws-sdk

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

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

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

Github repo 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

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

1 个答案:

答案 0 :(得分: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

我建议你开始使用依赖项管理器,这样你就可以在你的repo中修复你的依赖项,并在任何地方都有可重现的构建。

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