@@ -27,10 +27,12 @@ type timelineItem struct { func (i timelineItem) TemplateName() string { switch i.TimelineItem.(type) { case changes.Comment: return "comment" case changes.Review: return "review" case changes.TimelineItem: return "event" default: panic(fmt.Errorf("unknown item type %T", i.TimelineItem)) } @@ -38,10 +40,12 @@ func (i timelineItem) TemplateName() string { func (i timelineItem) CreatedAt() time.Time { switch i := i.TimelineItem.(type) { case changes.Comment: return i.CreatedAt case changes.Review: return i.CreatedAt case changes.TimelineItem: return i.CreatedAt default: panic(fmt.Errorf("unknown item type %T", i)) } @@ -49,10 +53,12 @@ func (i timelineItem) CreatedAt() time.Time { func (i timelineItem) ID() uint64 { switch i := i.TimelineItem.(type) { case changes.Comment: return i.ID case changes.Review: return i.ID case changes.TimelineItem: return i.ID default: panic(fmt.Errorf("unknown item type %T", i)) }