aboutsummaryrefslogtreecommitdiffstats
path: root/pkg/email/parser.go
diff options
context:
space:
mode:
authorAleksandr Nogikh <nogikh@google.com>2022-12-05 13:55:41 +0100
committerAleksandr Nogikh <wp32pw@gmail.com>2022-12-05 14:43:35 +0100
commit64eb5abeff73f290c3b76aa97c6acd7ed627fa2d (patch)
treee2bf2339b133543a2950fcc2eb0e9c25904bd3d5 /pkg/email/parser.go
parentdff7de3a521bb4e0538796e8c96e380270f5bfc9 (diff)
pkg/email: refactor ParsePatch
Currently the function returns the values that are not being used anywhere. Refactor it.
Diffstat (limited to 'pkg/email/parser.go')
-rw-r--r--pkg/email/parser.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/pkg/email/parser.go b/pkg/email/parser.go
index 796f0f7c2..6974f66d5 100644
--- a/pkg/email/parser.go
+++ b/pkg/email/parser.go
@@ -131,13 +131,13 @@ func Parse(r io.Reader, ownEmails []string, goodLists []string) (*Email, error)
patch, cmdStr, cmdArgs := "", "", ""
if !fromMe {
for _, a := range attachments {
- _, patch, _ = ParsePatch(string(a))
+ patch = ParsePatch(a)
if patch != "" {
break
}
}
if patch == "" {
- _, patch, _ = ParsePatch(bodyStr)
+ patch = ParsePatch(body)
}
cmd, cmdStr, cmdArgs = extractCommand(subject + "\n" + bodyStr)
}