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
|
||||
}
|
||||
|
||||
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,
|
||||
|
Loading…
Reference in New Issue
Block a user