mirror of
https://github.com/Maks1mS/bubbles.git
synced 2025-10-09 05:57:16 +03:00
Deprecate NewModel() constructors; use New() instead
This commit is contained in:
@@ -154,8 +154,8 @@ type Model struct {
|
||||
scaleRamp bool
|
||||
}
|
||||
|
||||
// NewModel returns a model with default values.
|
||||
func NewModel(opts ...Option) Model {
|
||||
// New returns a model with default values.
|
||||
func New(opts ...Option) Model {
|
||||
m := Model{
|
||||
id: nextID(),
|
||||
Width: defaultWidth,
|
||||
@@ -176,6 +176,11 @@ func NewModel(opts ...Option) Model {
|
||||
return m
|
||||
}
|
||||
|
||||
// NewModel returns a model with default values.
|
||||
//
|
||||
// Deprecated. Use New instead.
|
||||
var NewModel = New
|
||||
|
||||
// Init exists satisfy the tea.Model interface.
|
||||
func (m Model) Init() tea.Cmd {
|
||||
return nil
|
||||
|
Reference in New Issue
Block a user