-
Notifications
You must be signed in to change notification settings - Fork 4
Closed
Description
The idea came out here, when @c4rlo stated this
Having looked at the https://github.com/ccoVeille/go-safecast package a bit more closely
Specifically, the issue is that
safecast.MustConverttakes ananyargument, instead of being generic over the input type, meaning there are missed opportunities where things that could be compile-time errors are runtime errors.maybe the go-safecast package can also be improved
Originally posted by @c4rlo in spiffe/spire#5737 (comment)
I didn't consider this idea when I created Convert then added MustConvert
- Consider adding Convert function handling all types #21 with Add Convert and support conversion from string and boolean #55
- Add Must* functions that will panic on error #20 with feat: add MustConvert #59
Important
The change should be considered as a breaking change as the signature will change
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels