All returns a wrapped list of records in the current storage.
()
| 30 | |
| 31 | // All returns a wrapped list of records in the current storage. |
| 32 | func (w Records) All() []*Record { |
| 33 | wrapped := make([]*Record, 0) |
| 34 | w.records.ForEach(func(m proto.Message) error { |
| 35 | wrapped = append(wrapped, WrapRecord(m.(*pb.Record))) |
| 36 | return nil |
| 37 | }) |
| 38 | return wrapped |
| 39 | } |
| 40 | |
| 41 | // AllBut returns a wrapped list of records in the current storage |
| 42 | // but the one specified. |