mirror of
https://github.com/kubeshark/kubeshark.git
synced 2026-08-18 03:46:38 +00:00
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:
+1
-1
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user