diff options
author | Michael Muré <batolettre@gmail.com> | 2018-08-23 19:19:16 +0200 |
---|---|---|
committer | Michael Muré <batolettre@gmail.com> | 2018-08-23 19:19:16 +0200 |
commit | e7648996c8f278d061fe03a5c4d255049da765e5 (patch) | |
tree | 2917891d130853b24a375ef00b68fe14c8228296 /bug/operations | |
parent | 16f55e3f4d560330a638986130d27fd067300169 (diff) | |
download | git-bug-e7648996c8f278d061fe03a5c4d255049da765e5.tar.gz |
bug: add a new BugExerpt that hold a subset of a bug state for efficient sorting and retrieval
Diffstat (limited to 'bug/operations')
-rw-r--r-- | bug/operations/add_comment.go | 2 | ||||
-rw-r--r-- | bug/operations/create.go | 2 | ||||
-rw-r--r-- | bug/operations/create_test.go | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/bug/operations/add_comment.go b/bug/operations/add_comment.go index b4126a8e..5ecc471a 100644 --- a/bug/operations/add_comment.go +++ b/bug/operations/add_comment.go @@ -21,7 +21,7 @@ func (op AddCommentOperation) Apply(snapshot bug.Snapshot) bug.Snapshot { Message: op.Message, Author: op.Author, Files: op.files, - UnixTime: op.UnixTime, + UnixTime: op.UnixTime(), } snapshot.Comments = append(snapshot.Comments, comment) diff --git a/bug/operations/create.go b/bug/operations/create.go index ecbafb6f..5fc939dd 100644 --- a/bug/operations/create.go +++ b/bug/operations/create.go @@ -22,7 +22,7 @@ func (op CreateOperation) Apply(snapshot bug.Snapshot) bug.Snapshot { { Message: op.Message, Author: op.Author, - UnixTime: op.UnixTime, + UnixTime: op.UnixTime(), }, } snapshot.Author = op.Author diff --git a/bug/operations/create_test.go b/bug/operations/create_test.go index a20472d3..319cdb7f 100644 --- a/bug/operations/create_test.go +++ b/bug/operations/create_test.go @@ -21,7 +21,7 @@ func TestCreate(t *testing.T) { expected := bug.Snapshot{ Title: "title", Comments: []bug.Comment{ - {Author: rene, Message: "message", UnixTime: create.UnixTime}, + {Author: rene, Message: "message", UnixTime: create.UnixTime()}, }, Author: rene, CreatedAt: create.Time(), |