diff options
author | Michael Muré <batolettre@gmail.com> | 2018-07-12 21:31:11 +0200 |
---|---|---|
committer | Michael Muré <batolettre@gmail.com> | 2018-07-12 21:32:10 +0200 |
commit | 3aecdf2c2da9017513ca04a183089099fb3677d5 (patch) | |
tree | ed4d0de0f815ca5f4f0e5deb4bb39a0d68e7fd52 | |
parent | 3087a472bfe61db806a052ea2afd57d22b8c5d95 (diff) | |
download | git-bug-3aecdf2c2da9017513ca04a183089099fb3677d5.tar.gz |
create the Snapshot type for a compiled bug operation log
-rw-r--r-- | bug/bug.go | 13 | ||||
-rw-r--r-- | bug/label.go | 3 | ||||
-rw-r--r-- | commands/new.go | 2 |
3 files changed, 16 insertions, 2 deletions
@@ -1,7 +1,18 @@ package bug -type Bug struct { +// Snapshot is a compiled form of the Bug data structure used for storage and merge +type Snapshot struct { Title string Comments []Comment + Labels []Label } +//func (bug Bug) Check() error { +// if bug.Operations.Len() == 0 { +// return "Empty operation log" +// } +// +// if bug.Operations.Elems() +// +// return true +//} diff --git a/bug/label.go b/bug/label.go new file mode 100644 index 00000000..c202cd70 --- /dev/null +++ b/bug/label.go @@ -0,0 +1,3 @@ +package bug + +type Label string diff --git a/commands/new.go b/commands/new.go index 43bfd212..6dd19508 100644 --- a/commands/new.go +++ b/commands/new.go @@ -55,7 +55,7 @@ func newBug(repo repository.Repo, args []string) error { Message: *newMessage, } - bug := bug.Bug{ + bug := bug.Snapshot{ Title: title, Comments: []bug.Comment{comment}, } |