How can I use redis.ScanStruct
to parse strings as booleans or even as custom types?
The struct I am using looks like this:
type Attrs struct {
Secret string `redis:"secret"`
RequireSecret string `redis:"requireSecret"`
UserID string `redis:"userId"`
}
The RequireSecret attribute is either a "true" or "false" string, I'd like to scan it as a bool
.