aboutsummaryrefslogtreecommitdiffstats
path: root/bug/comment.go
diff options
context:
space:
mode:
Diffstat (limited to 'bug/comment.go')
-rw-r--r--bug/comment.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/bug/comment.go b/bug/comment.go
index 0b4fd6ad..ef5d9ef7 100644
--- a/bug/comment.go
+++ b/bug/comment.go
@@ -6,6 +6,7 @@ import (
"time"
)
+// Comment represent a comment in a Bug
type Comment struct {
Author Person
Message string
@@ -16,6 +17,7 @@ type Comment struct {
UnixTime int64
}
+// FormatTime format the UnixTime of the comment for human consumption
func (c Comment) FormatTime() string {
t := time.Unix(c.UnixTime, 0)
return humanize.Time(t)