Add any type and output errors
This commit is contained in:
@@ -4,6 +4,7 @@ import (
|
||||
"fmt"
|
||||
"password/account"
|
||||
"password/files"
|
||||
"password/output"
|
||||
|
||||
"github.com/fatih/color"
|
||||
)
|
||||
@@ -55,7 +56,7 @@ func deleteAccount(vault *account.VaultWithDb) {
|
||||
if isDeleted {
|
||||
color.Green("Удалено")
|
||||
} else {
|
||||
color.Red("Не найдено")
|
||||
output.PrintError("Не найдено")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -66,7 +67,7 @@ func createAccount(vault *account.VaultWithDb) {
|
||||
|
||||
myAccount, err := account.NewAccount(login, password, url)
|
||||
if err != nil {
|
||||
fmt.Println("ОШИБКА: Неверный формат URL или Login")
|
||||
output.PrintError("ОШИБКА: Неверный формат URL или Login")
|
||||
return
|
||||
}
|
||||
vault.AddAccount(*myAccount)
|
||||
|
||||
Reference in New Issue
Block a user