Home > Net >  Go Redis - Tutorial Get Started doesn't work
Go Redis - Tutorial Get Started doesn't work

Time:09-16

Hi,

I have made several redis and go tutorial sites. Most of the pages don't work. Here's a very simple one that doesn't work.

https://developer.redis.com/develop/golang/

And here is the error message.

# command-line-arguments
./main.go:17:29: too many arguments in call to client.cmdable.Ping
    have (context.Context)
    want ()

How to make the tutorial work?

CodePudding user response:

What version of go-redis are you using? In version 8 it should work. github.com/go-redis/redis/v8

See this example code on how to use it: https://github.com/go-redis/redis/blob/master/example_test.go

It usually helps to check out the (github) repository fo the lastest version and usage.

  • Related