Go入门笔记43-HGet查询
示例代码如下
value, error := db.HGet(([]byte)(id), []byte(feildName))
if error != nil {
return xxx, nil
}
if value == nil {
continue
}
这里如果没有读到数据,注意返回的数据将是nil.无error。
示例代码如下
value, error := db.HGet(([]byte)(id), []byte(feildName))
if error != nil {
return xxx, nil
}
if value == nil {
continue
}
这里如果没有读到数据,注意返回的数据将是nil.无error。