I'm working with golang and used termui library for a purpose. find ref here for the library.
termui.Handle("/timer/1s", func(e termui.Event) {
if true {
if true {
strs = []string{"something"}
} else {
strs = []string{"something else"}
}
ls.Items = strs // ls := termui.NewList()
} else {
strs = []string{"something else"}
ls.Items = strs
}
termui.Render(ls)
})
above code is to suppose write a text on terminal window but nothing is happend. I've not got any ref or solution regarding same. above code is working on windows but not in ubuntu 18.04.
also
termui.Handle("/sys/kbd/C-c", func(termui.Event) {
termui.StopLoop()
})
above code working on windows but not in ubuntu 18.04.
Please provide a solution or alternatives for above.
thanks in advance.
Here I'm answering my own question. Owner of library change their events and functions. They deprecated /timer/1s
and force user to use Go
s build in timer. here is library changes and documentation