[PD1] small changes
This commit is contained in:
parent
568b6e6739
commit
2cafc3163c
10 changed files with 160 additions and 71 deletions
|
@ -11,15 +11,6 @@ func readStdin(message string) string {
|
|||
fmt.Println(message)
|
||||
scanner := bufio.NewScanner(os.Stdin)
|
||||
scanner.Scan()
|
||||
// FIX: make sure this doesnt die
|
||||
return scanner.Text()
|
||||
}
|
||||
|
||||
func AskUserPassword() string {
|
||||
fmt.Println("Enter key store password")
|
||||
scanner := bufio.NewScanner(os.Stdin)
|
||||
scanner.Scan()
|
||||
// FIX: make sure this doesnt die
|
||||
return scanner.Text()
|
||||
}
|
||||
|
||||
|
@ -43,9 +34,13 @@ func showMessagesInfo(page int, numPages int, messages []ClientMessageInfo) int
|
|||
return 0
|
||||
}
|
||||
for _, message := range messages {
|
||||
if message.Subject == "" {
|
||||
fmt.Printf("ERROR DECRYPTING MESSAGE %v IN QUEUE FROM UID %v\n", message.Num, message.FromUID)
|
||||
continue
|
||||
}
|
||||
fmt.Printf("%v:%v:%v:%v\n", message.Num, message.FromUID, message.Timestamp, message.Subject)
|
||||
}
|
||||
fmt.Printf("Page %v/%v\n",page,numPages)
|
||||
fmt.Printf("Page %v/%v\n", page, numPages)
|
||||
return messagesInfoPageNavigation(page, numPages)
|
||||
}
|
||||
|
||||
|
@ -89,11 +84,9 @@ func messagesInfoPageNavigation(page int, numPages int) int {
|
|||
return 0
|
||||
}
|
||||
|
||||
|
||||
func showMessage(message ClientMessage) {
|
||||
fmt.Printf("From: %s\n", message.FromUID)
|
||||
fmt.Printf("To: %s\n", message.ToUID)
|
||||
fmt.Printf("Subject: %s\n", message.Subject)
|
||||
fmt.Printf("Body: %s\n", message.Body)
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue