mirror of
https://github.com/taigrr/bubbletea.git
synced 2026-04-02 02:59:09 -07:00
chore: rename StartReturningModel to Run
Added aliases for the old functions, but deprecated them.
This commit is contained in:
@@ -200,7 +200,7 @@ The last step is to simply run our program. We pass our initial model to
|
||||
```go
|
||||
func main() {
|
||||
p := tea.NewProgram(initialModel())
|
||||
if err := p.Start(); err != nil {
|
||||
if _, err := p.Run(); err != nil {
|
||||
fmt.Printf("Alas, there's been an error: %v", err)
|
||||
os.Exit(1)
|
||||
}
|
||||
|
||||
@@ -79,7 +79,7 @@ func (m model) View() string {
|
||||
|
||||
func main() {
|
||||
p := tea.NewProgram(initialModel())
|
||||
if err := p.Start(); err != nil {
|
||||
if _, err := p.Run(); err != nil {
|
||||
fmt.Printf("Alas, there's been an error: %v", err)
|
||||
os.Exit(1)
|
||||
}
|
||||
|
||||
@@ -169,7 +169,7 @@ as a `struct` with defaults.
|
||||
|
||||
```go
|
||||
func main() {
|
||||
if err := tea.NewProgram(model{}).Start(); err != nil {
|
||||
if _, err := tea.NewProgram(model{}).Run(); err != nil {
|
||||
fmt.Printf("Uh oh, there was an error: %v\n", err)
|
||||
os.Exit(1)
|
||||
}
|
||||
|
||||
@@ -71,7 +71,7 @@ func (m model) View() string {
|
||||
}
|
||||
|
||||
func main() {
|
||||
if err := tea.NewProgram(model{}).Start(); err != nil {
|
||||
if _, err := tea.NewProgram(model{}).Run(); err != nil {
|
||||
fmt.Printf("Uh oh, there was an error: %v\n", err)
|
||||
os.Exit(1)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user