aboutsummaryrefslogblamecommitdiffstats
path: root/bug/comment.go
blob: 6314777609043b70d9eb1ffa71215de53342d474 (plain) (tree)
1
2
3
4
5
6
7
8
9
10

           

             


                      


                                                                                                                    
                      
 

                                      
                                                           
 
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.
	UnixTime int64
}

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