aboutsummaryrefslogtreecommitdiffstats
path: root/misc/random_bugs/create_random_bugs.go
diff options
context:
space:
mode:
authorMichael Muré <batolettre@gmail.com>2018-10-01 23:31:16 +0200
committerMichael Muré <batolettre@gmail.com>2018-10-01 23:31:16 +0200
commit6ea6f3614e46a62f4a37c6afb488547a3d548191 (patch)
tree8a32431ce90dd8b169aac858b99a761b8f76c95f /misc/random_bugs/create_random_bugs.go
parentf026f61aaaa7b9e579e99f171f7fefb38c4c6181 (diff)
downloadgit-bug-6ea6f3614e46a62f4a37c6afb488547a3d548191.tar.gz
bug: in op convenience function, return the new op to be able to set metadata later
Diffstat (limited to 'misc/random_bugs/create_random_bugs.go')
-rw-r--r--misc/random_bugs/create_random_bugs.go12
1 files changed, 6 insertions, 6 deletions
diff --git a/misc/random_bugs/create_random_bugs.go b/misc/random_bugs/create_random_bugs.go
index ba4d6a66..8faee200 100644
--- a/misc/random_bugs/create_random_bugs.go
+++ b/misc/random_bugs/create_random_bugs.go
@@ -65,7 +65,7 @@ func GenerateRandomBugsWithSeed(opts Options, seed int64) []*bug.Bug {
for i := 0; i < opts.BugNumber; i++ {
addedLabels = []string{}
- b, err := bug.Create(
+ b, _, err := bug.Create(
randomPerson(opts.PersonNumber),
time.Now().Unix(),
fake.Sentence(),
@@ -163,19 +163,19 @@ func paragraphs() string {
}
func comment(b bug.Interface, p bug.Person) {
- _ = bug.AddComment(b, p, time.Now().Unix(), paragraphs())
+ _, _ = bug.AddComment(b, p, time.Now().Unix(), paragraphs())
}
func title(b bug.Interface, p bug.Person) {
- _ = bug.SetTitle(b, p, time.Now().Unix(), fake.Sentence())
+ _, _ = bug.SetTitle(b, p, time.Now().Unix(), fake.Sentence())
}
func open(b bug.Interface, p bug.Person) {
- _ = bug.Open(b, p, time.Now().Unix())
+ _, _ = bug.Open(b, p, time.Now().Unix())
}
func close(b bug.Interface, p bug.Person) {
- _ = bug.Close(b, p, time.Now().Unix())
+ _, _ = bug.Close(b, p, time.Now().Unix())
}
var addedLabels []string
@@ -202,5 +202,5 @@ func labels(b bug.Interface, p bug.Person) {
// ignore error
// if the randomisation produce no changes, no op
// is added to the bug
- _, _ = bug.ChangeLabels(b, p, time.Now().Unix(), added, removed)
+ _, _, _ = bug.ChangeLabels(b, p, time.Now().Unix(), added, removed)
}