HandleIdentityEncoding is like [Plugin.HandleIdentity] but provides the full identity encoding string to the callback. It allows using functions like ParseIdentity directly.
(f func(identity string) (age.Identity, error))
| 139 | // |
| 140 | // It allows using functions like ParseIdentity directly. |
| 141 | func (p *Plugin) HandleIdentityEncoding(f func(identity string) (age.Identity, error)) { |
| 142 | p.HandleIdentity(func(data []byte) (age.Identity, error) { |
| 143 | return f(EncodeIdentity(p.name, data)) |
| 144 | }) |
| 145 | } |
| 146 | |
| 147 | // Main runs the plugin protocol. It returns an exit code to pass to os.Exit. |
| 148 | // |
nothing calls this directly
no test coverage detected