termui/_examples/hello_world.go
2018-11-29 15:52:53 -08:00

23 lines
302 B
Go

package main
import ui "github.com/gizak/termui"
func main() {
err := ui.Init()
if err != nil {
panic(err)
}
defer ui.Close()
p := ui.NewParagraph("Hello World!")
p.Width = 25
p.Height = 5
ui.Render(p)
for e := range ui.PollEvents() {
if e.Type == ui.KeyboardEvent {
break
}
}
}