rafaeljusto/redigomock

Suggested change for new release

Closed this issue · 1 comments

szank commented

Hi Rafael,
You have created 1.0 tag, so I can suggest slight modification to redigomock behaviour.
We have discussed it before. If you force redigomock Do() command arguments to be matched only in the order they have been called ( overriding this issue #1 ) you could simplify fuzzy/non fuzzy command matching, treating every command as it was a fuzzy one.

What do you think about this idea? I think that the current situation is a bit confusing: if there is no fuzzy mach, then arguments can be given in any order, but if there is at least one fuzzy matcher, then the argument order have to mach the one given in the mock command definition.

I am OK with leaving it as it is if you don't want to change it, and I will clarify documentation either way.

Best regards,
Maciej

Sure! This should simplify the usage of the library.

Could you also rename the file fuzzyMatch.go and fuzzyMatch_test.go to fuzzy_match.go and fuzzy_match_test.go respectively? I would like to respect the Go's naming conventions.

Cheers!
Rafael