Refactor: use only one exit for func
This commit is contained in:
parent
1dace23475
commit
e0f0133d42
7
pew.go
7
pew.go
@ -124,15 +124,16 @@ func testKernelExploit(q *qemu.QemuSystem, ka config.Artifact,
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
func genOkFail(name string, ok bool) aurora.Value {
|
func genOkFail(name string, ok bool) (aurv aurora.Value) {
|
||||||
if ok {
|
if ok {
|
||||||
s := " " + name + " SUCCESS "
|
s := " " + name + " SUCCESS "
|
||||||
return aurora.BgGreen(aurora.Black(s))
|
aurv = aurora.BgGreen(aurora.Black(s))
|
||||||
} else {
|
} else {
|
||||||
somethingFailed = true
|
somethingFailed = true
|
||||||
s := " " + name + " FAILURE "
|
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,
|
func dumpResult(q *qemu.QemuSystem, ka config.Artifact, ki config.KernelInfo,
|
||||||
|
Loading…
Reference in New Issue
Block a user