2
0
mirror of https://github.com/miguelmota/cointop synced 2024-11-14 18:12:57 +00:00
cointop/cointop/update.go
2020-08-09 18:42:04 -07:00

21 lines
291 B
Go

package cointop
import (
"fmt"
"github.com/miguelmota/gocui"
)
// Update takes a callback which updates the view
func (ct *Cointop) Update(f func() error) {
ct.debuglog(fmt.Sprintf("Update()"))
if ct.g == nil {
return
}
ct.g.Update(func(g *gocui.Gui) error {
return f()
})
}