Fix error check bug

This commit is contained in:
IamTheFij 2024-10-18 13:26:51 -07:00
parent 71aa5ed835
commit cddd3d69c4

View File

@ -67,8 +67,11 @@ func initialModel(fullscreen bool, colorLeft string, colorRight string) model {
} }
validateInt := func(text string) error { validateInt := func(text string) error {
_, err := strconv.Atoi(text) if _, err := strconv.Atoi(text); err != nil {
return fmt.Errorf("invalid int input: %w", err) return fmt.Errorf("invalid int input: %w", err)
}
return nil
} }
inputs[0].Placeholder = "Interval length (minutes or duration)" inputs[0].Placeholder = "Interval length (minutes or duration)"