blob: 660ce8216a0a56260d47415632a4770d097428dc (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
|
package gpgbin
import "fmt"
// GetPrivateKeyId runs gpg --list-secret-keys s
func GetPrivateKeyId(s string) (string, error) {
private := true
id := getKeyId(s, private)
if id == "" {
return "", fmt.Errorf("no private key found")
}
return id, nil
}
|