mirror of https://github.com/miguelmota/cointop
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.
23 lines
439 B
Go
23 lines
439 B
Go
package main
|
|
|
|
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
|
|
})
|
|
}
|