func (w *StatusbarWidget) Layout(g *gocui.Gui) error {
	v, err := g.SetView(w.name, w.x, w.y, w.x+w.w, w.y+3)
	if err != nil && err != gocui.ErrUnknownView {
		return err
	}
	v.Clear()
	v.Title = fmt.Sprintf(`Status [%s -> Help]`, strings.ToUpper(w.HelpKeyBinding))
	v.Wrap = true

	if w.hideGuids {
		w.currentMessage.Message = stripSecretVals(w.currentMessage.Message)
	}

	if w.currentMessage.InProgress {
		fmt.Fprint(v, style.Loading("⏳  "+w.currentMessage.Message))
	} else if w.currentMessage.Failure {
		fmt.Fprint(v, style.Loading("☠ "+w.currentMessage.Message))
	} else {
		fmt.Fprint(v, style.Completed("✓ "+w.currentMessage.Message))
	}
	fmt.Fprint(v, w.messageAddition)

	return nil
}
// Layout draws the widget in the gocui view
Layout draws the widget in the gocui view
// Layout draws the widget in the gocui view
func (w *StatusbarWidget) Layout(g *gocui.Gui) error {
	v, err := g.SetView(w.name, w.x, w.y, w.x+w.w, w.y+3)
	if err != nil && err != gocui.ErrUnknownView {
		return err
	}
	v.Clear()
	v.Title = fmt.Sprintf(`Status [%s -> Help]`, strings.ToUpper(w.HelpKeyBinding))
	v.Wrap = true
	if w.hideGuids {
		w.currentMessage.Message = stripSecretVals(w.currentMessage.Message)
	}
	if w.currentMessage.InProgress {
		fmt.Fprint(v, style.Loading("⏳  "+w.currentMessage.Message))
	} else if w.currentMessage.Failure {
		fmt.Fprint(v, style.Loading("☠ "+w.currentMessage.Message))
	} else {
		fmt.Fprint(v, style.Completed("✓ "+w.currentMessage.Message))
	}
	fmt.Fprint(v, w.messageAddition)
	return nil
}
func ( w * StatusbarWidget ) Layout ( g * gocui . Gui ) error { v , err := g . SetView ( w . name , w . x , w . y , w . x + w . w , w . y + 3 ) if err != nil && err != gocui . ErrUnknownView { return err } v . Clear ( ) v . Title = fmt . Sprintf ( `Status [%s -> Help]` , strings . ToUpper ( w . HelpKeyBinding ) ) v . Wrap = true if w . hideGuids { w . currentMessage . Message = stripSecretVals ( w . currentMessage . Message ) } if w . currentMessage . InProgress { fmt . Fprint ( v , style . Loading ( " w . c u rrentMessage.M e ssage)) } else if w . currentMessage . Failure { fmt . Fprint ( v , style . Loading ( " w . c u rrentMessage.M e ssage)) } else { fmt . Fprint ( v , style . Completed ( " w . c u rrentMessage.M e ssage)) } fmt . Fprint ( v , w . messageAddition ) return nil }
Layout draws the widget in the gocui view
Layout draws the widget in the gocui view