lint: apply new formatting rules

Run `make fmt`.

Signed-off-by: Moritz Poldrack <git@moritz.sh>
Acked-by: Robin Jarry <robin@jarry.cc>
This commit is contained in:
Moritz Poldrack 2022-07-31 22:16:40 +02:00 committed by Robin Jarry
parent 21dcd440f8
commit aaf0a0c656
78 changed files with 288 additions and 285 deletions

View file

@ -12,8 +12,8 @@ import (
)
func (trig *TriggersConfig) ExecTrigger(triggerCmd string,
triggerFmt func(string) (string, error)) error {
triggerFmt func(string) (string, error),
) error {
if len(triggerCmd) == 0 {
return errors.New("Trigger command empty")
}
@ -34,7 +34,8 @@ func (trig *TriggersConfig) ExecTrigger(triggerCmd string,
}
func (trig *TriggersConfig) ExecNewEmail(account *AccountConfig,
conf *AercConfig, msg *models.MessageInfo) {
conf *AercConfig, msg *models.MessageInfo,
) {
err := trig.ExecTrigger(trig.NewEmail,
func(part string) (string, error) {
formatstr, args, err := format.ParseMessageFormat(
@ -45,7 +46,8 @@ func (trig *TriggersConfig) ExecNewEmail(account *AccountConfig,
format.Ctx{
FromAddress: account.From,
AccountName: account.Name,
MsgInfo: msg},
MsgInfo: msg,
},
)
if err != nil {
return "", err