MCPcopy Index your code
hub / github.com/git-bug/git-bug / SearchTimelineItem

Method SearchTimelineItem

entities/bug/snapshot.go:65–73  ·  view source on GitHub ↗

SearchTimelineItem will search in the timeline for an item matching the given hash

(id entity.CombinedId)

Source from the content-addressed store, hash-verified

63
64// SearchTimelineItem will search in the timeline for an item matching the given hash
65func (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
76func (snap *Snapshot) SearchComment(id entity.CombinedId) (*Comment, error) {

Callers 1

editMethod · 0.80

Calls 2

ErrorfMethod · 0.80
CombinedIdMethod · 0.65

Tested by

no test coverage detected