aboutsummaryrefslogtreecommitdiffstats
path: root/bug/operation_pack.go
diff options
context:
space:
mode:
authorMichael Muré <batolettre@gmail.com>2018-07-13 16:48:55 +0200
committerMichael Muré <batolettre@gmail.com>2018-07-13 16:48:55 +0200
commitdeff9e0a41eca43f832314219241c9a63cf8007e (patch)
tree215e07e7a77972cee50268603eeb3777de583e8b /bug/operation_pack.go
parent078545538e6e6bf7a050fe6602a42a61fb5203e9 (diff)
downloadgit-bug-deff9e0a41eca43f832314219241c9a63cf8007e.tar.gz
add basic tests for Bug and OperationIterator
Diffstat (limited to 'bug/operation_pack.go')
-rw-r--r--bug/operation_pack.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/bug/operation_pack.go b/bug/operation_pack.go
index e3d64e72..21376b9c 100644
--- a/bug/operation_pack.go
+++ b/bug/operation_pack.go
@@ -15,6 +15,10 @@ func (opp *OperationPack) Append(op Operation) {
opp.Operations = append(opp.Operations, op)
}
+func (opp *OperationPack) IsEmpty() bool {
+ return len(opp.Operations) == 0
+}
+
func (opp *OperationPack) IsValid() bool {
- return len(opp.Operations) > 0
+ return !opp.IsEmpty()
}