Ambiguity in time.Duration manipulation #34787
Labels
FrozenDueToAge
WaitingForInfo
Issue is not actionable because of missing required information, which needs to be provided.
time.Duration
currently requires non-constant, non-literal multiplication with factors, such as hours x 3, minutes x 10, to be performed with explicit casting of the factor withtime.Duration(factor)
. However, this casting can result in surprising duration products, when the programmer forgets to include the unit multiplier.Should we therefore allow implicit casting of non-duration factors, as well as deprecate casting real values without units to durations?
The text was updated successfully, but these errors were encountered: