| 1 |
package gpgbin |
| 2 |
|
| 3 |
import ( |
| 4 |
"io" |
| 5 |
) |
| 6 |
|
| 7 |
// Import runs gpg --import and thus imports both private and public keys |
| 8 |
func Import(r io.Reader) error { |
| 9 |
args := []string{"--import"} |
| 10 |
g := newGpg(r, args) |
| 11 |
err := g.cmd.Run() |
| 12 |
if err != nil { |
| 13 |
return err |
| 14 |
} |
| 15 |
return nil |
| 16 |
} |