Skip to content

Commit

Permalink
chore: use strings.Contains instead
Browse files Browse the repository at this point in the history
Signed-off-by: guoguangwu <guoguangwu@magic-shield.com>
  • Loading branch information
testwill authored and taraspos committed Dec 27, 2023
1 parent 2106864 commit 7af3e12
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion middlewares/mail.go
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ func (m *Mail) sendMail(ctx *core.Context) error {
}

func (m *Mail) from() string {
if strings.Index(m.EmailFrom, "%") == -1 {
if !strings.Contains(m.EmailFrom, "%") {
return m.EmailFrom
}

Expand Down

0 comments on commit 7af3e12

Please sign in to comment.