We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Hi, I tried to copy the struct example at http://godoc.org/github.com/garyburd/redigo/redis#example-Args but i kept getting the error, "ERR wrong number of arguments for 'hmset' command"
func main() { c, err := redis.Dial("tcp", "127.0.0.1:6379") if err != nil { panic(err) } ss := &somestruct{} ss.a = "apple" ss.b = "banana" if _, err := c.Do("HMSET", redis.Args{}.Add("id1").AddFlat(ss)...); err != nil { panic(err) } } /* /go/bin$ go run redis.go panic: ERR wrong number of arguments for 'hmset' command goroutine 1 [running]: main.main() /go/bin/redis.go:23 +0x389 goroutine 2 [syscall]: exit status 2 */
although, if i just enter my values in manually, it seems to work.
The text was updated successfully, but these errors were encountered:
The example will work as expected if you export the fields.
I will update the documentation to note that exported identifiers are required.
Sorry, something went wrong.
completely forgot about that, thanks!
No branches or pull requests
Hi,
I tried to copy the struct example at http://godoc.org/github.com/garyburd/redigo/redis#example-Args but i kept getting the error, "ERR wrong number of arguments for 'hmset' command"
although, if i just enter my values in manually, it seems to work.
The text was updated successfully, but these errors were encountered: