Redis: How to set and get struct to/from redis?

Created on 5 Dec 2013  路  1Comment  路  Source: go-redis/redis

Can you provide an example for get/set golang struct?

Most helpful comment

This is not a Redis client responsibility. You can use msgpack ( https://github.com/vmihailenco/msgpack ) or encoding/json to serialize Go struct. Then redis.Set and redis.Get can be used to store serialized struct in Redis DB.

>All comments

This is not a Redis client responsibility. You can use msgpack ( https://github.com/vmihailenco/msgpack ) or encoding/json to serialize Go struct. Then redis.Set and redis.Get can be used to store serialized struct in Redis DB.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

gurre picture gurre  路  5Comments

patrickwhite256 picture patrickwhite256  路  7Comments

MaerF0x0 picture MaerF0x0  路  7Comments

mouhong picture mouhong  路  3Comments

aahoughton picture aahoughton  路  5Comments