You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
cointop/cointop/status.go

23 lines
442 B
Go

package cointop
import (
"fmt"
"github.com/jroimartin/gocui"
"github.com/miguelmota/cointop/pkg/pad"
)
func (ct *Cointop) updateStatus(s string) {
maxX, _ := ct.g.Size()
ct.statusview.Clear()
fmt.Fprintln(ct.statusview, pad.Right(fmt.Sprintf("[q]uit %s", s), maxX, " "))
}
func (ct *Cointop) showLink() {
url := ct.rowLink()
ct.g.Update(func(g *gocui.Gui) error {
ct.updateStatus(fmt.Sprintf("[↵]%s", url))
return nil
})
}