Skip to content
This repository has been archived by the owner on Mar 22, 2021. It is now read-only.

redigo依赖问题 #11

Closed
wgjas2 opened this issue Oct 16, 2018 · 6 comments
Closed

redigo依赖问题 #11

wgjas2 opened this issue Oct 16, 2018 · 6 comments
Labels

Comments

@wgjas2
Copy link

wgjas2 commented Oct 16, 2018

编译失败,错误: “pkg\mod\github.com\garyburd\redigo@v2.0.0+incompatible\redis\pool.go:28:2: use of internal package github.com/gomodule/redigo/internal not allowed”

经查原因如下:
redigo已经移到新地址: github.com/gomodule/redigo
但是middleware/cache/redis.go引用的还是旧库: github.com/garyburd/redigo

@hb-chen
Copy link
Owner

hb-chen commented Oct 16, 2018

github.com/garyburd/redigo@v2.0.0是依赖了github.com/gomodule/redigo,可以换用1.6版本
或者加上github.com/gomodule/redigo的包“glide get github.com/gomodule/redigo”看下

@wgjas2
Copy link
Author

wgjas2 commented Oct 16, 2018

现在是用go1.11.1和1.11带的go module管理依赖,回不去了,我暂时把代码复制到本地改依赖编译

@hb-chen
Copy link
Owner

hb-chen commented Oct 16, 2018

module也一样,只要把github.com/gomodule/redigo的依赖加进来就ok了
module我还没试过😂

@wgjas2
Copy link
Author

wgjas2 commented Oct 16, 2018

module也一样,只要把github.com/gomodule/redigo的依赖加进来就ok了
module我还没试过😂

我尝试过没用,go module太智能了,认准import,两个依赖都会被自动加入,然后依然报错😂

@hb-chen
Copy link
Owner

hb-chen commented Oct 16, 2018

“pkg\mod\github.com\garyburd\redigo@v2.0.0+incompatible\redis\pool.go:28:2: use of internal package github.com/gomodule/redigo/internal not allowed”

问题不在module的依赖管理,在internal包,garyburd\redigo引用gomodule/redigo的internal包是有问题的,用1.6吧!

@wgjas2
Copy link
Author

wgjas2 commented Oct 17, 2018

“pkg\mod\github.com\garyburd\redigo@v2.0.0+incompatible\redis\pool.go:28:2: use of internal package github.com/gomodule/redigo/internal not allowed”

问题不在module的依赖管理,在internal包,garyburd\redigo引用gomodule/redigo的internal包是有问题的,用1.6吧!

这我是知道的,不过不想回1.6了,先本地用着吧

@hb-chen hb-chen closed this as completed Oct 19, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants