package unknown import ( "fmt" "github.com/rivo/tview" "github.com/wtfutil/wtf/wtf" ) type Widget struct { wtf.TextWidget app *tview.Application settings *Settings } func NewWidget(app *tview.Application, name string, settings *Settings) *Widget { widget := Widget{ TextWidget: wtf.NewTextWidget(app, settings.common, false), app: app, settings: settings, } return &widget } /* -------------------- Exported Functions -------------------- */ func (widget *Widget) Refresh() { widget.app.QueueUpdateDraw(func() { widget.View.Clear() content := fmt.Sprintf("Widget %s does not exist", widget.CommonSettings.Title) widget.View.SetText(content) }) }