aboutsummaryrefslogtreecommitdiffstats
path: root/bug/comment.go
blob: 8ea4154fba7c6d68dd18cf6b8dec673a1e6ca3b7 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
package bug

import "time"

type Comment struct {
	Author  Person
	Message string

	// Creation time of the comment.
	// Should be used only for human display, never for ordering as we can't rely on it in a distributed system.
	Time int64
}

func (c Comment) FormatTime() string {
	return time.Unix(c.Time, 0).Format(time.RFC822)
}