From ab1858fcd056e957275aa9d2765b4b0f78fcce76 Mon Sep 17 00:00:00 2001 From: Trevor Slocum Date: Mon, 12 Oct 2020 10:19:41 -0700 Subject: [PATCH] Update example in README --- README.md | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 0df5f48..e485724 100644 --- a/README.md +++ b/README.md @@ -51,8 +51,15 @@ import ( ) func main() { - box := cview.NewBox().SetBorder(true).SetTitle("Hello, world!") - if err := cview.NewApplication().SetRoot(box, true).Run(); err != nil { + app := cview.NewApplication() + + box := cview.NewTextView() + box.SetBorder(true) + box.SetTitle("Hello, world!") + box.SetText("Lorem ipsum dolor sit amet") + + app.SetRoot(box, true) + if err := app.Run(); err != nil { panic(err) } }