Skip to content

Instantly share code, notes, and snippets.

@Matt3o12
Created April 9, 2015 20:51
Show Gist options
  • Save Matt3o12/509957fda48f2e4e677d to your computer and use it in GitHub Desktop.
Save Matt3o12/509957fda48f2e4e677d to your computer and use it in GitHub Desktop.
package main
import (
"time"
ui "github.com/gizak/termui"
)
func main() {
err := ui.Init()
if err != nil {
panic(err)
}
defer ui.Close()
ui.UseTheme("helloworld")
foo := ui.NewPar("Foo")
foo.Height = 20
bar := ui.NewPar("BAR")
bar.Height = 20
all := ui.NewPar("aLLLL")
all.Height = 10
ui.Body.AddRows(
ui.NewRow(
ui.NewCol(10, 1, foo),
ui.NewCol(2, 0, bar),
), ui.NewRow(
ui.NewCol(12, 0, all),
),
)
ui.Body.Align()
ui.Render(foo, bar, all)
time.Sleep(60 * time.Second)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment