From 601673808dd2d0dd4f2b22bb6cffcc6d27f41288 Mon Sep 17 00:00:00 2001 From: "Moritz F. Kuntze" Date: Thu, 18 Jul 2019 14:11:34 +0200 Subject: [PATCH] Fix #287. --- go/src/gopenpgpwrapper/gopenpgpwrapper.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/go/src/gopenpgpwrapper/gopenpgpwrapper.go b/go/src/gopenpgpwrapper/gopenpgpwrapper.go index 9c7999a..1e93bed 100644 --- a/go/src/gopenpgpwrapper/gopenpgpwrapper.go +++ b/go/src/gopenpgpwrapper/gopenpgpwrapper.go @@ -10,7 +10,11 @@ import ( ) type Key struct { - kr crypto.KeyRing + if len(k.kr.GetEntities()) > 0 { + return k.kr.GetEntities()[0].PrimaryKey.KeyIdShortString() + } else { + return "" + } } func (k *Key) GetKeyID() string {