From 6ea6f3614e46a62f4a37c6afb488547a3d548191 Mon Sep 17 00:00:00 2001 From: Michael Muré Date: Mon, 1 Oct 2018 23:31:16 +0200 Subject: bug: in op convenience function, return the new op to be able to set metadata later --- misc/random_bugs/create_random_bugs.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'misc/random_bugs') 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) } -- cgit