gpt4 book ai didi

go - 安装 gorp (GO) 时遇到问题

转载 作者:IT王子 更新时间:2023-10-29 02:17:19 25 4
gpt4 key购买 nike

嘿,我正在尝试安装 the gorp library ,

go get github.com/coopernurse/gorp

但出现以下错误:

# 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

gorp build 刚刚坏了吗?还是我做错了什么?

感谢您的任何建议。

最佳答案

确保使用最新的go才能成功编译这个库。

我刚刚测试过:

go version go1.2.1 windows/amd64

那确实编译了,包括 strange line 1534 :

case arg.Kind() == reflect.Struct && !(arg.Type().PkgPath() == "time" && arg.Type().Name() == "Time"):
return expandNamedQuery(m, query, arg.FieldByName)

关于go - 安装 gorp (GO) 时遇到问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23773198/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com