1
0
Fork 0

Refactor: use only one exit for func

timestamps
dump_stack() 2018-12-10 02:41:45 +00:00
parent 1dace23475
commit e0f0133d42
1 changed files with 4 additions and 3 deletions

7
pew.go
View File

@ -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,