mirror of
https://github.com/Maks1mS/bubbles.git
synced 2025-10-10 06:11:22 +03:00
Return an error if we could not initialize a new gradient ramp
This commit is contained in:
committed by
Christian Rocha
parent
5d6d8cb0fb
commit
f48e53556a
@@ -18,9 +18,11 @@ const (
|
||||
)
|
||||
|
||||
func main() {
|
||||
progress := progress.NewModel(
|
||||
progress.WithDefaultRamp(),
|
||||
)
|
||||
progress, err := progress.NewModel(progress.WithDefaultRamp())
|
||||
if err != nil {
|
||||
fmt.Println("Could not initialize progress model:", err)
|
||||
os.Exit(1)
|
||||
}
|
||||
|
||||
if err := tea.NewProgram(example{progress: progress}).Start(); err != nil {
|
||||
fmt.Println("Oh no!", err)
|
||||
|
Reference in New Issue
Block a user