Open ideasculptor opened 2 years ago
Any progress on That?? @ideasculptor @ryantate13
I'll update the PR so that it is up to date with go-redis:master but I doubt either of us is going to find ourselves with the time to do the full implementation that would be required to get someone to merge this any time soon. This fork serves our needs sufficiently as it is.
Check back in a few hours and I should have the PR updated.
Check back in a few hours and I should have the PR updated.
done
client.Do
is a special API, its return value is not a fixed data type, if you want to set the return value of int64, please refer to the example:
// or []interface{}{int64(100), int64(200)}
mock.ExpectDo("hkeys", "hkey").SetVal([]interface{}{"100", "200"})
v, err := client.Do(ctx, "hkeys", "hkey").Int64Slice()
t.Log(v, err)
Added example implementations for handling Do() with various return types. Needs to be fleshed out with all of the various potential return types and tests, but demonstrates the concept. I may eventually get around to implementing the feature in its entirety, but probably not anytime soon, unfortunately, so this PR exists largely for documentary purposes in the associated issue: https://github.com/go-redis/redismock/issues/25