AllBut returns a wrapped list of records in the current storage but the one specified.
(exclude *Record)
| 41 | // AllBut returns a wrapped list of records in the current storage |
| 42 | // but the one specified. |
| 43 | func (w Records) AllBut(exclude *Record) []*Record { |
| 44 | wrapped := make([]*Record, 0) |
| 45 | w.records.ForEach(func(m proto.Message) error { |
| 46 | record := m.(*pb.Record) |
| 47 | if record.Id != exclude.record.Id { |
| 48 | wrapped = append(wrapped, WrapRecord(record)) |
| 49 | } |
| 50 | return nil |
| 51 | }) |
| 52 | return wrapped |
| 53 | } |
| 54 | |
| 55 | // CreateRecord creates a new record from raw data. |
| 56 | func (w Records) CreateRecord(data []float32) *Record { |