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
Right now code is not able to work with type aliases.
And an error will be reported at runtme
The issue is present with Convert that was recently added, but also maybe with all existing methods.
The solution might require a large refactoring.
The issue was found in the following PR spiffe/spire#5737 when they tried to use my lib
Having looked at the https://github.com/ccoVeille/go-safecast package a bit more closely, I actually think we're better off implementing the functionality we need from it ourselves, at least for now.
Specifically, the issue is that safecast.MustConvert takes an any argument, instead of being generic over the input type, meaning there are missed opportunities where things that could be compile-time errors are runtime errors.
I'll update this PR accordingly (though eventually maybe the go-safecast package can also be improved).
Right now code is not able to work with type aliases.
And an error will be reported at runtme
The issue is present with Convert that was recently added, but also maybe with all existing methods.
The solution might require a large refactoring.
The issue was found in the following PR spiffe/spire#5737 when they tried to use my lib
Originally posted by @c4rlo in spiffe/spire#5737 (comment)
The text was updated successfully, but these errors were encountered: