From 22c654c9b16746274db3207121c200f4f84cea50 Mon Sep 17 00:00:00 2001 From: Dan Anglin Date: Tue, 20 Aug 2024 00:07:43 +0100 Subject: [PATCH] [skip ci] update error messages --- internal/flag/timedurationvalue.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/internal/flag/timedurationvalue.go b/internal/flag/timedurationvalue.go index 010a8d2..6524372 100644 --- a/internal/flag/timedurationvalue.go +++ b/internal/flag/timedurationvalue.go @@ -37,22 +37,22 @@ func (v *TimeDurationValue) Set(value string) error { case strings.Contains(matches[ind], "day"): days, err = parseInt(matches[ind]) if err != nil { - return fmt.Errorf("unable to parse the integer from %s: %w", matches[ind], err) + return fmt.Errorf("unable to parse the number of days from %s: %w", matches[ind], err) } case strings.Contains(matches[ind], "hour"): hours, err = parseInt(matches[ind]) if err != nil { - return fmt.Errorf("unable to parse the integer from %s: %w", matches[ind], err) + return fmt.Errorf("unable to parse the number of hours from %s: %w", matches[ind], err) } case strings.Contains(matches[ind], "minute"): minutes, err = parseInt(matches[ind]) if err != nil { - return fmt.Errorf("unable to parse the integer from %s: %w", matches[ind], err) + return fmt.Errorf("unable to parse the number of minutes from %s: %w", matches[ind], err) } case strings.Contains(matches[ind], "second"): seconds, err = parseInt(matches[ind]) if err != nil { - return fmt.Errorf("unable to parse the integer from %s: %w", matches[ind], err) + return fmt.Errorf("unable to parse the number of seconds from %s: %w", matches[ind], err) } } }