From 133a315b2c9bb39071df6fc0cae973d457e55965 Mon Sep 17 00:00:00 2001 From: Christian Rocha Date: Sat, 6 Feb 2021 19:14:38 +0000 Subject: [PATCH] Remove double import in textinput example + make a var name less weird --- examples/textinput/main.go | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/examples/textinput/main.go b/examples/textinput/main.go index 1051395..07e439f 100644 --- a/examples/textinput/main.go +++ b/examples/textinput/main.go @@ -8,7 +8,6 @@ import ( "log" "github.com/charmbracelet/bubbles/textinput" - input "github.com/charmbracelet/bubbles/textinput" tea "github.com/charmbracelet/bubbletea" ) @@ -25,19 +24,19 @@ type tickMsg struct{} type errMsg error type model struct { - textInput input.Model + textInput textinput.Model err error } func initialModel() model { - inputModel := input.NewModel() - inputModel.Placeholder = "Pikachu" - inputModel.Focus() - inputModel.CharLimit = 156 - inputModel.Width = 20 + ti := textinput.NewModel() + ti.Placeholder = "Pikachu" + ti.Focus() + ti.CharLimit = 156 + ti.Width = 20 return model{ - textInput: inputModel, + textInput: ti, err: nil, } }