redis icon indicating copy to clipboard operation
redis copied to clipboard

Can't install the go-session/redis anymore

Open chrl opened this issue 6 years ago • 1 comments

Command: go get -u -v github.com/go-session/redis

Actual result:

github.com/go-session/redis (download)
github.com/go-redis/redis (download)
github.com/go-session/session (download)
github.com/go-session/redis
# github.com/go-session/redis
../../../go/src/github.com/go-session/redis/options.go:75:3: cannot use o.Dialer (type func() (net.Conn, error)) as type func(context.Context, string, string) (net.Conn, error) in field value

Expected result: go-session/redis is installed.

chrl avatar Jun 21 '19 08:06 chrl

I think this issue cause by go-redis/redis had change the struct Options's function Dialer . the old is Dialer func() (net.Conn, error) now is Dialer func(ctx context.Context, network, addr string) (net.Conn, error)

I have 2 solutions. remove local go-redis package, then go get github.com/go-redis/[email protected]

or, u can try this https://github.com/snifferhu/redis. I fix this bug. waiting for author @LyricTian merge.

snifferhu avatar Sep 10 '19 12:09 snifferhu