Skip to content

Commit 837211d

Browse files
AlinsRanCopilot
andauthored
Update internal/types/duration.go
Co-authored-by: Copilot <[email protected]>
1 parent 4314e4b commit 837211d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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)