mirror of
https://github.com/Maks1mS/bubbles.git
synced 2025-10-10 06:11:22 +03:00
Deprecate NewModel() constructors; use New() instead
This commit is contained in:
@@ -153,7 +153,7 @@ type Model struct {
|
||||
}
|
||||
|
||||
// NewModel creates a new model with default settings.
|
||||
func NewModel() Model {
|
||||
func New() Model {
|
||||
return Model{
|
||||
Prompt: "> ",
|
||||
BlinkSpeed: defaultBlinkSpeed,
|
||||
@@ -174,6 +174,11 @@ func NewModel() Model {
|
||||
}
|
||||
}
|
||||
|
||||
// NewModel creates a new model with default settings.
|
||||
//
|
||||
// Deprecated. Use New instead.
|
||||
var NewModel = New
|
||||
|
||||
// SetValue sets the value of the text input.
|
||||
func (m *Model) SetValue(s string) {
|
||||
runes := []rune(s)
|
||||
|
Reference in New Issue
Block a user