You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I want to use int array for the arguments to sadd, then I found that it only supports strings array:
func appendArgs(dst, src []interface{}) []interface{} { if len(src) == 1 { if ss, ok := src[0].([]string); ok { for _, s := range ss { dst = append(dst, s) } return dst } } for _, v := range src { dst = append(dst, v) } return dst }
Maybe it could be change somewhere like this?
func appendArgs(dst, src []interface{}) []interface{} { if len(src) == 1 { if ss, ok := src[0].([]string); ok { for _, s := range ss { dst = append(dst, s) } return dst } // new add if ss, ok := src[0].([]int); ok { for _, s := range ss { dst = append(dst, s) } return dst } } for _, v := range src { dst = append(dst, v) } return dst }
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
I want to use int array for the arguments to sadd, then I found that it only supports strings array:
Maybe it could be change somewhere like this?
Beta Was this translation helpful? Give feedback.
All reactions