radix
radix copied to clipboard
Flatten with empty slice in struct yields wrong number of arguments
A struct of the form:
struct {
Other string
Nested []string
}
with with Nested left to it's empty value, generates an invalid number of arguments for HMSET, leading to the error:
unmarshaling message off Conn: ERR wrong number of arguments for 'hmset' command
Suggested solutions:
- Defaulting for
Nestedto an empty string""for empty values, consistent with normal empty string values, explicitly emptying the value. - Adding an
omitemptyoption, preventing this value from being (over)written withHMSET.