From 12a4e7e54540b5412dc8572804df68b087bea0f6 Mon Sep 17 00:00:00 2001 From: Rodolfo Carvalho Date: Sat, 26 Dec 2015 14:25:35 +0100 Subject: [PATCH] Use "ui" instead of "termui" in example code To be consistent with the other examples. --- README.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 9879d09..0e1d41b 100644 --- a/README.md +++ b/README.md @@ -93,22 +93,22 @@ Grid layout uses [12 columns grid system](http://www.w3schools.com/bootstrap/boo ```go // handle key q pressing - termui.Handle("/sys/kbd/q", func(termui.Event) { + ui.Handle("/sys/kbd/q", func(ui.Event) { // press q to quit - termui.StopLoop() + ui.StopLoop() }) - termui.Handle("/sys/kbd/C-x", func(termui.Event) { + ui.Handle("/sys/kbd/C-x", func(ui.Event) { // handle Ctrl + x combination }) - termui.Handle("/sys/kbd", func(termui.Event) { + ui.Handle("/sys/kbd", func(ui.Event) { // handle all other key pressing }) // handle a 1s timer - termui.Handle("/timer/1s", func(e ui.Event) { - t := e.Data.(termui.EvtTimer) + ui.Handle("/timer/1s", func(e ui.Event) { + t := e.Data.(ui.EvtTimer) // t is a EvtTimer if t.Count%2 ==0 { // do something