mirror of
https://github.com/rwinkhart/MUTN.git
synced 2026-08-28 04:46:41 -04:00
Greatly reduce code duplication in clipboard implementations
This commit is contained in:
@@ -65,9 +65,7 @@ func EntryReader(decryptedEntry []string, hidePassword bool) {
|
||||
}
|
||||
|
||||
func EntryReaderShortcut(targetLocation string, hidePassword bool) {
|
||||
if isFile, _ := offline.TargetIsFile(targetLocation, true); isFile {
|
||||
if isFile, _ := offline.TargetIsFile(targetLocation, true, 2); isFile {
|
||||
EntryReader(offline.DecryptGPG(targetLocation), hidePassword)
|
||||
} else {
|
||||
fmt.Println(offline.AnsiError + "Failed to read \"" + targetLocation + "\" - it is a directory" + offline.AnsiReset)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user