add subprocess

This commit is contained in:
2023-03-21 23:03:25 +00:00
parent 54ea92886e
commit 4f3d419c28
12 changed files with 202 additions and 146 deletions

View File

@@ -42,11 +42,11 @@ func getPassword(args ...any) (string, error) {
break
}
if char[0] == 3 || char[0] == 4 {
return "", fmt.Errorf("User cancelled")
return "", fmt.Errorf("keyboard interupt")
} else if char[0] == '\r' || char[0] == '\n' {
fmt.Println()
break
} else if char[0] == '\b' {
} else if char[0] == '\b' || char[0] == 127 {
if len(password) > 0 {
password = password[:len(password)-1]
fmt.Print("\b \b")