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
Having every struct support a redis tag is both tedius and requires explicit tailoring for go-redis. By default, the reflect package adds a json tag. Or, in the case of encoding/xml, they just create a fallback field name when there is no tag.
It would be nice if I could hand HSet() an arbitrary struct, and it would go ahead and choose the field names like some other packages do. Currently, go-redis skips untagged fields as if they were tagged as "-".
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
-
Having every struct support a
redis
tag is both tedius and requires explicit tailoring forgo-redis
. By default, thereflect
package adds ajson
tag. Or, in the case ofencoding/xml
, they just create a fallback field name when there is no tag.https://github.com/golang/go/blob/813aad51d947b207f5bed4511c479c0921870b3d/src/encoding/xml/typeinfo.go#L193
It would be nice if I could hand
HSet()
an arbitrary struct, and it would go ahead and choose the field names like some other packages do. Currently,go-redis
skips untagged fields as if they were tagged as"-"
.go-redis/commands.go
Lines 105 to 108 in c0ab781
Beta Was this translation helpful? Give feedback.
All reactions