Fix specifying a message via file.

no-tls
Martin Dosch 4 months ago
parent 55e16b417d
commit b4613f5cf0
No known key found for this signature in database
GPG Key ID: 52A57CFCE13D657D

@ -3,6 +3,7 @@
## UNRELEASED
### Changed
- Use a human readable file name for private Ox keys.
- Fix specifying a message via command line flag `-m`.
## [v0.8.2] 2024-01-19
### Changed

@ -50,7 +50,7 @@ func readMessage(messageFilePath string) (string, error) {
// Check that message file is existing.
_, err = os.Stat(messageFilePath)
if os.IsNotExist(err) {
if err != nil {
return output, fmt.Errorf("readMessage: %w", err)
}
@ -69,7 +69,7 @@ func readMessage(messageFilePath string) (string, error) {
}
}
if err := scanner.Err(); err != nil {
if err = scanner.Err(); err != nil {
if err != io.EOF {
return "", fmt.Errorf("readMessage: %w", err)
}
@ -80,7 +80,7 @@ func readMessage(messageFilePath string) (string, error) {
fmt.Println("error while closing file:", err)
}
return output, fmt.Errorf("readMessage: %w", err)
return output, nil
}
func main() {

Loading…
Cancel
Save