Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

包引用的问题 #82

Closed
qxs820624 opened this issue May 16, 2020 · 1 comment
Closed

包引用的问题 #82

qxs820624 opened this issue May 16, 2020 · 1 comment

Comments

@qxs820624
Copy link

qxs820624 commented May 16, 2020

https://github.com/satori/go.uuid/blob/master/generator.go
func NewV4() (UUID, error) {
return global.NewV4()
}

master分支:
\middleware\requestid.go
引用了"github.com/satori/go.uuid"
if requestId == "" {
u4 := uuid.NewV4()
requestId = u4.String()
}

这怎么编译通过的?返回的参数个数不一致,我编译不过

satori/go.uuid#106
这里提到 GO111MODULE=on go get -u github.com/satori/go.uuid@master

2、
https://github.com/casbin/casbin/branches
github.com/casbin/casbin 没有v2这个branch
master:
pkg\casbin\mycasbin.go 引用"github.com/casbin/casbin/v2" 我这边会报错
同理
https://github.com/casbin/gorm-adapter/branches/all 没有v2分支
gormadapter "github.com/casbin/gorm-adapter/v2" 引用报错

只能使用GO111MODULE=on go get -v github.com/casbin/casbin/v2 引入包
所以应该在开发环境中指定 1.11以上版本

@wenjianzhang
Copy link
Member

casbin/casbin#363

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants