goamz/sqs/md5.go:57: undefined: md5.Sum 问题

huangapple go评论86阅读模式
英文:

goamz/sqs/md5.go:57: undefined: md5.Sum issue

问题

我正在尝试在一个 http://www.nitrous.io 的盒子上使用 golang 版本 go1.1.1 linux/amd64 来操作 aws sqs。

当我从这个 github 仓库 https://github.com/crowdmob/goamz/tree/master/sqs 导入 sqs 模块,并且用以下命令运行我的代码:

go run myCode.go

我遇到了这个问题:

# github.com/crowdmob/goamz/sqs                                                                                                       
../src/github.com/crowdmob/goamz/sqs/md5.go:57: undefined: md5.Sum 

我对该模块的调用如下:

import "github.com/crowdmob/goamz/sqs"

而且我可以使用同一仓库中的其他模块,例如 aws 和 S3:

import "github.com/crowdmob/goamz/aws"
import "github.com/crowdmob/goamz/s3"

查看 goamz 仓库中的 /sqs/md5.go 中的错误,我可以看到 Sum 函数,并且导入似乎都进行得很好:

package sqs

import (
    "crypto/md5"
    "encoding/binary"
    "sort"
)

所以我对发生的情况有点困惑。有什么想法吗?

英文:

I am trying to manipulate aws sqs on a http://www.nitrous.io box with golang version go1.1.1 linux/amd64.

When I import the sqs module from this github repository https://github.com/crowdmob/goamz/tree/master/sqs and I run my code with a

 go run myCode.go

I face this issue:

# github.com/crowdmob/goamz/sqs                                                                                                       
../src/github.com/crowdmob/goamz/sqs/md5.go:57: undefined: md5.Sum 

My call for that module is like this:

import "github.com/crowdmob/goamz/sqs"

And I can use other modules from the same repo. for example the aws and the S3 one

import "github.com/crowdmob/goamz/aws"
import "github.com/crowdmob/goamz/s3"

Looking at the error in the /sqs/md5.go from the goamz repository I can see the function Sum and it seems the import are done well:

package sqs

import (
	"crypto/md5"
	"encoding/binary"
	"sort"
)

So I am a bit clueless on what's happening. Any Idea?

答案1

得分: 2

你正在使用一个旧版本的Go语言——md5.Sum在go1.1.1中不存在。

请升级到go1.3版本。

英文:

You're using an old version of Go -- md5.Sum didn't exist in go1.1.1.

Update to go1.3

答案2

得分: -1

你是否执行了测试文件?这可能是由此引起的,与chendesheng所说的构建状态有关。

英文:

Did you performed the testing files ? It could come from this, refering to the build state as said chendesheng

huangapple
  • 本文由 发表于 2014年7月16日 15:05:52
  • 转载请务必保留本文链接:https://go.coder-hub.com/24774295.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定