diff --git a/pkg/bootstrap/bootstrap_plain_git.go b/pkg/bootstrap/bootstrap_plain_git.go index cde38961..da341d6a 100644 --- a/pkg/bootstrap/bootstrap_plain_git.go +++ b/pkg/bootstrap/bootstrap_plain_git.go @@ -465,9 +465,7 @@ func getOpenPgpEntity(keyRing openpgp.EntityList, passphrase, keyID string) (*op var entity *openpgp.Entity if keyID != "" { - if strings.HasPrefix(keyID, "0x") { - keyID = strings.TrimPrefix(keyID, "0x") - } + keyID = strings.TrimPrefix(keyID, "0x") if len(keyID) != 16 { return nil, fmt.Errorf("invalid GPG key id length; expected %d, got %d", 16, len(keyID)) }