ScanProto scans command result into proto.Message pb.
(pb proto.Message)
| 230 | |
| 231 | // ScanProto scans command result into proto.Message pb. |
| 232 | func (cmd ProtoCmd) ScanProto(pb proto.Message) error { |
| 233 | s, err := cmd.result() |
| 234 | if err != nil { |
| 235 | return ConvertError(err) |
| 236 | } |
| 237 | return UnmarshalProto(s, pb) |
| 238 | } |
| 239 | |
| 240 | // GetProto unmarshals protocol buffer message stored under key k in r into pb. |
| 241 | // Note, that GetProto passes k verbatim to the underlying store and hence, k must represent the full key(including namespace etc.). |