SearchTimelineItem will search in the timeline for an item matching the given hash
(id entity.CombinedId)
| 63 | |
| 64 | // SearchTimelineItem will search in the timeline for an item matching the given hash |
| 65 | func (snap *Snapshot) SearchTimelineItem(id entity.CombinedId) (TimelineItem, error) { |
| 66 | for i := range snap.Timeline { |
| 67 | if snap.Timeline[i].CombinedId() == id { |
| 68 | return snap.Timeline[i], nil |
| 69 | } |
| 70 | } |
| 71 | |
| 72 | return nil, fmt.Errorf("timeline item not found") |
| 73 | } |
| 74 | |
| 75 | // SearchComment will search for a comment matching the given id |
| 76 | func (snap *Snapshot) SearchComment(id entity.CombinedId) (*Comment, error) { |
no test coverage detected