Skip to content

Commit 837211d

Browse files
AlinsRanCopilot
andauthored
Update internal/types/duration.go
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent 4314e4b commit 837211d

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

internal/types/duration.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ func (d *TimeDuration) UnmarshalJSON(data []byte) error {
4848
}
4949
d.Duration = dur
5050
default:
51-
panic("unknown type")
51+
return fmt.Errorf("unknown type: %T", v)
5252
}
5353
return nil
5454
}

0 commit comments

Comments
 (0)