diff options
author | Michael Muré <batolettre@gmail.com> | 2018-07-13 16:48:55 +0200 |
---|---|---|
committer | Michael Muré <batolettre@gmail.com> | 2018-07-13 16:48:55 +0200 |
commit | deff9e0a41eca43f832314219241c9a63cf8007e (patch) | |
tree | 215e07e7a77972cee50268603eeb3777de583e8b /bug/operation_pack.go | |
parent | 078545538e6e6bf7a050fe6602a42a61fb5203e9 (diff) | |
download | git-bug-deff9e0a41eca43f832314219241c9a63cf8007e.tar.gz |
add basic tests for Bug and OperationIterator
Diffstat (limited to 'bug/operation_pack.go')
-rw-r--r-- | bug/operation_pack.go | 6 |
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() } |