You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Usually, when a function returns an error, its other return values are considered
undefined. The current implementation of strconv.ParseInt, however, makes sure to return
meaningful values even in error cases. For format errors, it always returns 0 instead of
leaking parser state, and for overflow it returns the biggest/smallest possible value
and preserves the sign, as opposed to just wrapping around or behaving in other
unexpected ways.
These attributes can simplify code at the caller site, but only if they are documented
and guaranteed to stay in future versions and other implementations of the standard
library.
If they are in fact intended parts of the API, they should be documented as such.
The text was updated successfully, but these errors were encountered:
The text was updated successfully, but these errors were encountered: