diff options
author | Jesse Duffield <jessedduffield@gmail.com> | 2021-04-02 19:20:40 +1100 |
---|---|---|
committer | Jesse Duffield <jessedduffield@gmail.com> | 2021-04-06 19:34:32 +1000 |
commit | 798d3e2d54e828f25ed4aadcefff11593fa23e10 (patch) | |
tree | 3b68eedd78e13836da8d7b8c46c5862c458f02a0 /pkg/gui/confirmation_panel.go | |
parent | e8f99c3326f543b713cafb6420a5b9c3c9b4d50c (diff) |
get rid of these positively ghastly method signatures
Diffstat (limited to 'pkg/gui/confirmation_panel.go')
-rw-r--r-- | pkg/gui/confirmation_panel.go | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/pkg/gui/confirmation_panel.go b/pkg/gui/confirmation_panel.go index f21a3be71..74c4cc9d6 100644 --- a/pkg/gui/confirmation_panel.go +++ b/pkg/gui/confirmation_panel.go @@ -317,6 +317,12 @@ func (gui *Gui) setKeyBindings(opts createPopupPanelOpts) error { return nil } +func (gui *Gui) wrappedHandler(f func() error) func(g *gocui.Gui, v *gocui.View) error { + return func(g *gocui.Gui, v *gocui.View) error { + return f() + } +} + func (gui *Gui) createErrorPanel(message string) error { colorFunction := color.New(color.FgRed).SprintFunc() coloredMessage := colorFunction(strings.TrimSpace(message)) |