Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- type Attrs struct {
- Secret string `redis:"secret"`
- RequireSecret string `redis:"requireSecret"`
- UserID string `redis:"userId"`
- }
- type Attrs struct {
- Secret string `redis:"secret"`
- RequireSecret bool `redis:"requireSecret"`
- UserID string `redis:"userId"`
- }
- values, err := redis.Values(c.Do("HGETALL", key))
- if err != nil {
- // handle error
- }
- var attrs Attrs
- err = redis.ScanStruct(values, &attrs)
- if err != nil {
- // handle error
- }
Add Comment
Please, Sign In to add comment