我正在从中获取数据,redis.HGetAll但没有找到将结果转换为我的 Struct 的干净方法。
var object struct {
x int
}
result := redisClient.HGetAll(context.Background(), "the_h_key")
//TODO import the result content into the object
这个壮观的案例有什么功能吗?
我正在使用JSON包(编组,然后 UnMarshal 到结构)。
扬帆大鱼
子衿沉夜
慕标琳琳
随时随地看视频慕课网APP
相关分类