diff --git a/spinner/spinner.go b/spinner/spinner.go index 1b75d07..acd2d5a 100644 --- a/spinner/spinner.go +++ b/spinner/spinner.go @@ -16,6 +16,10 @@ const ( Dot ) +const ( + defaultFPS = 9 +) + var ( // Spinner frames spinners = map[Spinner][]string{ @@ -61,7 +65,7 @@ type Model struct { func NewModel() Model { return Model{ Type: Line, - FPS: 9, + FPS: defaultFPS, } } diff --git a/textinput/textinput.go b/textinput/textinput.go index 6173547..904644f 100644 --- a/textinput/textinput.go +++ b/textinput/textinput.go @@ -8,6 +8,10 @@ import ( "github.com/muesli/termenv" ) +const ( + defaultBlinkSpeed = time.Millisecond * 600 +) + var ( // color is a helper for returning colors color func(s string) termenv.Color = termenv.ColorProfile().Color @@ -160,7 +164,7 @@ type BlinkMsg struct{} func NewModel() Model { return Model{ Prompt: "> ", - BlinkSpeed: time.Millisecond * 600, + BlinkSpeed: defaultBlinkSpeed, Placeholder: "", TextColor: "", PlaceholderColor: "240",