comment.go
1package bug
2
3import "time"
4
5type Comment struct {
6 Author Person
7 Message string
8
9 // Creation time of the comment.
10 // Should be used only for human display, never for ordering as we can't rely on it in a distributed system.
11 Time int64
12}
13
14func (c Comment) FormatTime() string {
15 return time.Unix(c.Time, 0).Format(time.RFC822)
16}