From d973718567b0f7a7e775dbab2c557f0dda9afa29 Mon Sep 17 00:00:00 2001 From: Michael Muré Date: Sat, 14 Jul 2018 22:18:40 +0200 Subject: add time to comments --- bug/operations/create.go | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'bug/operations/create.go') diff --git a/bug/operations/create.go b/bug/operations/create.go index 49b648a2..81fc58f1 100644 --- a/bug/operations/create.go +++ b/bug/operations/create.go @@ -3,6 +3,7 @@ package operations import ( "github.com/MichaelMure/git-bug/bug" "reflect" + "time" ) // CreateOperation define the initial creation of a bug @@ -14,6 +15,7 @@ type CreateOperation struct { Title string Message string Author bug.Person + Time time.Time } func NewCreateOp(author bug.Person, title, message string) CreateOperation { @@ -22,6 +24,7 @@ func NewCreateOp(author bug.Person, title, message string) CreateOperation { Title: title, Message: message, Author: author, + Time: time.Now(), } } @@ -37,6 +40,7 @@ func (op CreateOperation) Apply(snapshot bug.Snapshot) bug.Snapshot { { Message: op.Message, Author: op.Author, + Time: op.Time, }, } return snapshot -- cgit