fix(lint): fix gci import ordering, golines line length, and govet err shadowing
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
1107731486
commit
b7ef05228b
2 changed files with 4 additions and 6 deletions
|
|
@ -9,10 +9,9 @@ import (
|
||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
gomail "github.com/emersion/go-message/mail"
|
|
||||||
|
|
||||||
imap "github.com/emersion/go-imap/v2"
|
imap "github.com/emersion/go-imap/v2"
|
||||||
"github.com/emersion/go-imap/v2/imapclient"
|
"github.com/emersion/go-imap/v2/imapclient"
|
||||||
|
gomail "github.com/emersion/go-message/mail"
|
||||||
|
|
||||||
"github.com/sipeed/picoclaw/pkg/bus"
|
"github.com/sipeed/picoclaw/pkg/bus"
|
||||||
"github.com/sipeed/picoclaw/pkg/channels"
|
"github.com/sipeed/picoclaw/pkg/channels"
|
||||||
|
|
@ -216,12 +215,12 @@ func (c *EmailChannel) pollIMAP() {
|
||||||
}
|
}
|
||||||
defer client.Close()
|
defer client.Close()
|
||||||
|
|
||||||
if err := client.Login(c.config.IMAPUser, c.config.IMAPPassword.String()).Wait(); err != nil {
|
if err = client.Login(c.config.IMAPUser, c.config.IMAPPassword.String()).Wait(); err != nil {
|
||||||
logger.WarnCF("email", "IMAP login failed", map[string]any{"err": err})
|
logger.WarnCF("email", "IMAP login failed", map[string]any{"err": err})
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
if _, err := client.Select("INBOX", nil).Wait(); err != nil {
|
if _, err = client.Select("INBOX", nil).Wait(); err != nil {
|
||||||
logger.WarnCF("email", "IMAP SELECT INBOX failed", map[string]any{"err": err})
|
logger.WarnCF("email", "IMAP SELECT INBOX failed", map[string]any{"err": err})
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
@ -371,4 +370,3 @@ func extractPlainText(r io.Reader) string {
|
||||||
}
|
}
|
||||||
return ""
|
return ""
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -19,8 +19,8 @@ import (
|
||||||
"github.com/sipeed/picoclaw/pkg/bus"
|
"github.com/sipeed/picoclaw/pkg/bus"
|
||||||
"github.com/sipeed/picoclaw/pkg/channels"
|
"github.com/sipeed/picoclaw/pkg/channels"
|
||||||
_ "github.com/sipeed/picoclaw/pkg/channels/dingtalk"
|
_ "github.com/sipeed/picoclaw/pkg/channels/dingtalk"
|
||||||
_ "github.com/sipeed/picoclaw/pkg/channels/email"
|
|
||||||
_ "github.com/sipeed/picoclaw/pkg/channels/discord"
|
_ "github.com/sipeed/picoclaw/pkg/channels/discord"
|
||||||
|
_ "github.com/sipeed/picoclaw/pkg/channels/email"
|
||||||
_ "github.com/sipeed/picoclaw/pkg/channels/feishu"
|
_ "github.com/sipeed/picoclaw/pkg/channels/feishu"
|
||||||
_ "github.com/sipeed/picoclaw/pkg/channels/irc"
|
_ "github.com/sipeed/picoclaw/pkg/channels/irc"
|
||||||
_ "github.com/sipeed/picoclaw/pkg/channels/line"
|
_ "github.com/sipeed/picoclaw/pkg/channels/line"
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue