diff options
author | Michael Muré <batolettre@gmail.com> | 2018-07-25 21:25:26 +0200 |
---|---|---|
committer | Michael Muré <batolettre@gmail.com> | 2018-07-25 21:27:50 +0200 |
commit | 6706fa2bebcf5e1ff7001dbe82a9d79fa33ac096 (patch) | |
tree | ca346f24125a2d6b13d10f06dd8ddc06b6a30917 /bug/operations/label_change.go | |
parent | 78355c887a9cc1b058a1bbc6ff38df54e34a96b4 (diff) | |
download | git-bug-6706fa2bebcf5e1ff7001dbe82a9d79fa33ac096.tar.gz |
some cleaning
Diffstat (limited to 'bug/operations/label_change.go')
-rw-r--r-- | bug/operations/label_change.go | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/bug/operations/label_change.go b/bug/operations/label_change.go index b9bf86c8..568e132e 100644 --- a/bug/operations/label_change.go +++ b/bug/operations/label_change.go @@ -17,14 +17,6 @@ type LabelChangeOperation struct { Removed []bug.Label } -func NewLabelChangeOperation(author bug.Person, added, removed []bug.Label) LabelChangeOperation { - return LabelChangeOperation{ - OpBase: bug.NewOpBase(bug.LabelChangeOp, author), - Added: added, - Removed: removed, - } -} - func (op LabelChangeOperation) Apply(snapshot bug.Snapshot) bug.Snapshot { // Add in the set AddLoop: @@ -57,6 +49,15 @@ AddLoop: return snapshot } +func NewLabelChangeOperation(author bug.Person, added, removed []bug.Label) LabelChangeOperation { + return LabelChangeOperation{ + OpBase: bug.NewOpBase(bug.LabelChangeOp, author), + Added: added, + Removed: removed, + } +} + +// Convenience function to apply the operation func ChangeLabels(out io.Writer, b *bug.Bug, author bug.Person, add, remove []string) error { var added, removed []bug.Label |