Allow automatic generation of GPG keys

This commit is contained in:
2024-03-07 23:35:38 -05:00
parent 7fc1c46018
commit 276da8222f
+8 -5
View File
@@ -6,11 +6,14 @@ import (
func TempInitCli() {
// gpgID
//generateGPG := inputBinary("Auto-generate GPG key?")
uidSlice := offline.GpgUIDListGen()
gpgIDInt := inputMenuGen("Select GPG key:", uidSlice)
gpgID := uidSlice[gpgIDInt-1]
var gpgID string
if inputBinary("Auto-generate GPG key?") {
gpgID = offline.GpgKeyGen()
} else {
uidSlice := offline.GpgUIDListGen()
gpgIDInt := inputMenuGen("Select GPG key:", uidSlice)
gpgID = uidSlice[gpgIDInt-1]
}
// textEditor
textEditor := input("Text editor (leave blank for $EDITOR, falls back to \"vi\"):")