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:
@@ -193,14 +193,19 @@ func (m Model) Visible() bool {
|
||||
return !m.hidden() && !m.finished()
|
||||
}
|
||||
|
||||
// NewModel returns a model with default values.
|
||||
func NewModel() Model {
|
||||
// New returns a model with default values.
|
||||
func New() Model {
|
||||
return Model{
|
||||
Spinner: Line,
|
||||
id: nextID(),
|
||||
}
|
||||
}
|
||||
|
||||
// NewModel returns a model with default values.
|
||||
//
|
||||
// Deprecated. Use New instead.
|
||||
var NewModel = New
|
||||
|
||||
// TickMsg indicates that the timer has ticked and we should render a frame.
|
||||
type TickMsg struct {
|
||||
Time time.Time
|
||||
|
Reference in New Issue
Block a user