feat: allow plugin users to create a `ClientUI`
Greetings,
I would like to suggest an alternative to https://github.com/FiloSottile/age/pull/591 which will allow unblocking the consumer https://github.com/getsops/sops/pull/1641. (I'm interested in plugin support in sops so I can try out FIDO2 keys inside of Nix via sops-nix).
Instead of exposing all age internals into a separate package (which I presume isn't the best from a maintenance PoV), I move functions which need to be shared between plugin and main into two new internal private modules.
This lets me eventually expose NewClientUI() for consumers.
- Move logging functions to internal/logger.
- Move terminal related functions to internal/term
-
Expose a public
plugin.NewClientUI()
Kudos to @brianmcgee for the original work.
@FiloSottile I'm happy to iterate on this code, let me know your constraints and I'll work with you.
HTH.
And now with :100: passing tests, sorry.
FWIW, I saw that you were working on a plugin feature branch, and main still merges easily with your plugin after this, see https://github.com/nicdumz/age/commit/c8259addd76e68985a472ec814de76470477bf90 if you're interested.