cmd: clarify --time parse error in pcap dump

The error neither named the offending flag/value nor separated the
wrapped error from the message. Reported by Copilot on #1952.
This commit is contained in:
Volodymyr Stoiko
2026-07-30 15:43:03 +00:00
parent 95d0853518
commit a7085cfcce
+1 -1
View File
@@ -60,7 +60,7 @@ var pcapDumpCmd = &cobra.Command{
if timeIntervalStr != "" {
duration, err := time.ParseDuration(timeIntervalStr)
if err != nil {
return fmt.Errorf("invalid format %w", err)
return fmt.Errorf("invalid --time value %q: %w", timeIntervalStr, err)
}
tempCutoffTime := time.Now().Add(-duration)
cutoffTime = &tempCutoffTime