-
-
Notifications
You must be signed in to change notification settings - Fork 588
Description
In #580 we discussed how many applications, including the CLI itself, end up having to reimplement ParseRecipients and ParseIdentities to expand the set of accepted types. This is going to become even more of a thing now that filippo.io/age/tag is a thing.
We should probably figure out some pluggable mechanism.
#518 suggests adding an error that ParseRecipient/Identity functions can return to disown the encoding and let the caller try a different type. That might be part of the solution.
filippo.io/age/cmd.identitiesToRecipients has a similar issue, which might be solvable similarly, or might be solvable with reflection (all identities have a Recipient method that returns a type that implements the Recipient interface). Or maybe it doesn't matter as much.