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
The strconv.NumError struct (https://golang.org/pkg/strconv/#NumError) contains the error which caused the conversion to fail in the Err field. It seems like it would be nice for NumError to implement the Unwrap() error method so that, for example, errors.Is(err, strconv.ErrRange) could be used. By exposing the struct field it is already part of the API and implementing the Unwrap method is a more convenient and standard way to use it.
The text was updated successfully, but these errors were encountered:
I've just realised, this change was added in commit 0adc89a to master which hasn't yet been put in to a release. It's tagged for go1.14beta1. Sorry about that.
The strconv.NumError struct (https://golang.org/pkg/strconv/#NumError) contains the error which caused the conversion to fail in the Err field. It seems like it would be nice for NumError to implement the
Unwrap() error
method so that, for example,errors.Is(err, strconv.ErrRange)
could be used. By exposing the struct field it is already part of the API and implementing the Unwrap method is a more convenient and standard way to use it.The text was updated successfully, but these errors were encountered: