23 lines
302 B
Go
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
|
|
}
|
|
}
|
|
}
|