[英]trouble installing gorp (GO)
Hey I was trying to install the gorp library , 嘿,我正在尝试安装gorp库 ,
go get github.com/coopernurse/gorp
but got the following error: 但出现以下错误:
# github.com/coopernurse/gorp
/usr/lib/go/src/pkg/github.com/coopernurse/gorp/gorp.go:1534:
method arg.FieldByName is not an expression, must be called
is the gorp build just broken? gorp版本刚刚坏了吗? Or am I doing something wrong?
还是我做错了什么?
Thanks for any advice. 感谢您的任何建议。
Make sure to use the latest go in order to compile successfully this library. 确保使用最新版本,以便成功编译该库。
I just tested with: 我刚刚测试:
go version go1.2.1 windows/amd64
go版本go1.2.1 Windows / amd64
And that does compile, including the strange line 1534 : 确实可以编译,包括奇怪的行1534 :
case arg.Kind() == reflect.Struct && !(arg.Type().PkgPath() == "time" && arg.Type().Name() == "Time"):
return expandNamedQuery(m, query, arg.FieldByName)
The repository has moved to github.com/go-gorp/gorp . 存储库已移至github.com/go-gorp/gorp 。
Please install with go get gopkg.in/gorp.v1
. 请使用
go get gopkg.in/gorp.v1
安装。 Use the import
statement accordingly. 相应地使用
import
语句。
Note that, as the README says: 请注意,正如自述文件所述:
This package is compatible with the last 2 major versions of Go, at this time 1.3 and 1.4.
该软件包与Go的最后2个主要版本(此时为1.3和1.4)兼容。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.