MCPcopy
hub / github.com/hardentools/hardentools / ShowFailure

Function ShowFailure

gui.go:361–372  ·  view source on GitHub ↗

ShowFailure sets GUI status of name field to failureText

(name, failureText string)

Source from the content-addressed store, hash-verified

359
360// ShowFailure sets GUI status of name field to failureText
361func ShowFailure(name, failureText string) {
362 if mainWindow != nil {
363 stateLabels[name] = widget.NewLabel("...")
364 firstColumn.Add(container.NewHBox(widget.NewLabel(name)))
365 secondColumn.Add(container.NewHBox(widget.NewLabelWithStyle("FAIL", fyne.TextAlignLeading, fyne.TextStyle{Bold: true})))
366 thirdColumn.Add(container.NewHBox(stateLabels[name]))
367
368 showErrorDialog(name + " failed with error:\n" + failureText)
369 } else {
370 Info.Println(name + " failed with error: " + failureText)
371 }
372}
373
374// ShowIsHardened sets GUI result for name to is hardened
375func ShowIsHardened(name string) {

Callers 2

markStatusFunction · 0.70
triggerAllFunction · 0.70

Calls 1

showErrorDialogFunction · 0.70

Tested by

no test coverage detected