aboutsummaryrefslogtreecommitdiffstats
path: root/worker/maildir/search.go
diff options
context:
space:
mode:
Diffstat (limited to 'worker/maildir/search.go')
-rw-r--r--worker/maildir/search.go7
1 files changed, 4 insertions, 3 deletions
diff --git a/worker/maildir/search.go b/worker/maildir/search.go
index 7a8ba0e0..6260deb4 100644
--- a/worker/maildir/search.go
+++ b/worker/maildir/search.go
@@ -61,11 +61,12 @@ func parseSearch(args []string) (*searchCriteria, error) {
text = true
}
}
- if text {
+ switch {
+ case text:
criteria.Text = args[optind:]
- } else if body {
+ case body:
criteria.Body = args[optind:]
- } else {
+ default:
for _, arg := range args[optind:] {
criteria.Header.Add("Subject", arg)
}