operation_pack.go

 1package bug
 2
 3// OperationPack represent an ordered set of operation to apply
 4// to a Bug. These operations are stored in a single Git commit.
 5//
 6// These commits will be linked together in a linear chain of commits
 7// inside Git to form the complete ordered chain of operation to
 8// apply to get the final state of the Bug
 9type OperationPack struct {
10	Operations []Operation
11}
12
13// Append a new operation to the pack
14func (opp *OperationPack) Append(op Operation) {
15	opp.Operations = append(opp.Operations, op)
16}
17
18func (opp *OperationPack) IsValid() bool {
19	return len(opp.Operations) > 0
20}