Skip to content

Commit

Permalink
error fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Tensai75 committed Feb 26, 2024
1 parent b9c0b91 commit afa1f93
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions functions.go
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,8 @@ func decrypt(ciphertextString string, keyString string) (string, error) {
nonce, ciphertext := ciphertext[:nonceSize], ciphertext[nonceSize:]
decodedText, err := gcm.Open(nil, nonce, ciphertext, nil)
if err != nil {
return string(decodedText), nil
} else {
return "", err
} else {
return string(decodedText), nil
}
}
2 changes: 1 addition & 1 deletion testRead.go
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ func readArticleFromFile(messageId string) (*nntp.Article, error) {
return nil, fmt.Errorf("Unable to load message <%v>", messageId)
}

expHeader := regexp.MustCompile(`(Subject|Date|From|Message-ID|Path|Newsgroups|X-NxG): (.*)[ \n\r]`)
expHeader := regexp.MustCompile(`(Subject|Date|From|Message-ID|Path|Newsgroups|X-Nxg): (.*)[ \n\r]`)
headers := expHeader.FindAllStringSubmatch(string(readFile), -1)
article.Header = make(map[string][]string)
for _, header := range headers {
Expand Down

0 comments on commit afa1f93

Please sign in to comment.