mirror of
https://github.com/tw93/Mole.git
synced 2026-02-15 20:25:04 +00:00
refactor: replace deprecated Start with Run
This commit is contained in:
@@ -148,7 +148,7 @@ func main() {
|
|||||||
go prefetchOverviewCache(prefetchCtx)
|
go prefetchOverviewCache(prefetchCtx)
|
||||||
|
|
||||||
p := tea.NewProgram(newModel(abs, isOverview), tea.WithAltScreen())
|
p := tea.NewProgram(newModel(abs, isOverview), tea.WithAltScreen())
|
||||||
if err := p.Start(); err != nil {
|
if _, err := p.Run(); err != nil {
|
||||||
fmt.Fprintf(os.Stderr, "analyzer error: %v\n", err)
|
fmt.Fprintf(os.Stderr, "analyzer error: %v\n", err)
|
||||||
os.Exit(1)
|
os.Exit(1)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -136,7 +136,7 @@ func animTickWithSpeed(cpuUsage float64) tea.Cmd {
|
|||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
p := tea.NewProgram(newModel(), tea.WithAltScreen())
|
p := tea.NewProgram(newModel(), tea.WithAltScreen())
|
||||||
if err := p.Start(); err != nil {
|
if _, err := p.Run(); err != nil {
|
||||||
fmt.Fprintf(os.Stderr, "system status error: %v\n", err)
|
fmt.Fprintf(os.Stderr, "system status error: %v\n", err)
|
||||||
os.Exit(1)
|
os.Exit(1)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user