Skip to content

Breaking Change: Consider updating Convert and MustConvert signature #76

@ccoVeille

Description

@ccoVeille

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.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.

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

Important

The change should be considered as a breaking change as the signature will change

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions