redis
redis copied to clipboard
Can't install the go-session/redis anymore
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.
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.