git-bug/bug/comment.go

17 lines
332 B
Go
Raw Normal View History

package bug
2018-07-17 21:51:09 +03:00
import "time"
type Comment struct {
Author Person
Message string
2018-07-14 23:18:40 +03:00
// 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
}
2018-07-17 21:51:09 +03:00
func (c Comment) FormatTime() string {
return time.Unix(c.Time, 0).Format(time.RFC822)
}