diff options
author | Michael Muré <batolettre@gmail.com> | 2018-07-13 21:21:24 +0200 |
---|---|---|
committer | Michael Muré <batolettre@gmail.com> | 2018-07-13 21:21:24 +0200 |
commit | 1779a0f3b92d58654b43444addeaf437a64d77a8 (patch) | |
tree | 9f973413454894f0456d7379425070d468712242 /bug/operations/create.go | |
parent | 289f8d53ee960d35c1f0c42e8753ad536737b875 (diff) | |
download | git-bug-1779a0f3b92d58654b43444addeaf437a64d77a8.tar.gz git-bug-1779a0f3b92d58654b43444addeaf437a64d77a8.zip |
serialize a Bug to git as a blob+tree+commit+ref
Diffstat (limited to 'bug/operations/create.go')
-rw-r--r-- | bug/operations/create.go | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/bug/operations/create.go b/bug/operations/create.go index 57cca907..9911ee89 100644 --- a/bug/operations/create.go +++ b/bug/operations/create.go @@ -10,22 +10,24 @@ import ( var _ bug.Operation = CreateOperation{} type CreateOperation struct { - Title string - Message string - Author bug.Person + bug.OpBase + Title string `json:"t"` + Message string `json:"m"` + Author bug.Person `json:"a"` } func NewCreateOp(author bug.Person, title, message string) CreateOperation { return CreateOperation{ + OpBase: bug.OpBase{OperationType: bug.CREATE}, Title: title, Message: message, Author: author, } } -func (op CreateOperation) OpType() bug.OperationType { - return bug.CREATE -} +//func (op CreateOperation) OpType() bug.OperationType { +// return bug.CREATE +//} func (op CreateOperation) Apply(snapshot bug.Snapshot) bug.Snapshot { empty := bug.Snapshot{} |