blob: c0c07076a0cf3eac0c7d7c1d6dc42de7ab0e2d88 (
plain) (
tree)
|
|
package bug
import (
"github.com/dustin/go-humanize"
"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.
UnixTime int64
}
func (c Comment) FormatTime() string {
t := time.Unix(c.UnixTime, 0)
return humanize.Time(t)
}
|