From e0f0133d428fcfc6482134caa72efe8aded3da71 Mon Sep 17 00:00:00 2001 From: Mikhail Klementev Date: Mon, 10 Dec 2018 02:41:45 +0000 Subject: [PATCH] Refactor: use only one exit for func --- pew.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/pew.go b/pew.go index 474b1a7..805d757 100644 --- a/pew.go +++ b/pew.go @@ -124,15 +124,16 @@ func testKernelExploit(q *qemu.QemuSystem, ka config.Artifact, return } -func genOkFail(name string, ok bool) aurora.Value { +func genOkFail(name string, ok bool) (aurv aurora.Value) { if ok { s := " " + name + " SUCCESS " - return aurora.BgGreen(aurora.Black(s)) + aurv = aurora.BgGreen(aurora.Black(s)) } else { somethingFailed = true s := " " + name + " FAILURE " - return aurora.BgRed(aurora.Gray(aurora.Bold(s))) + aurv = aurora.BgRed(aurora.Gray(aurora.Bold(s))) } + return } func dumpResult(q *qemu.QemuSystem, ka config.Artifact, ki config.KernelInfo,