1
0
mirror of https://github.com/jhillyerd/inbucket.git synced 2026-01-09 04:31:55 +00:00

Many linter fixes for smtpd pkg

This commit is contained in:
James Hillyerd
2017-12-26 22:16:47 -08:00
parent ac21675bd7
commit 06165cb3d3
7 changed files with 50 additions and 39 deletions

View File

@@ -150,10 +150,12 @@ type FileMailbox struct {
messages []*FileMessage
}
// Name of the mailbox
func (mb *FileMailbox) Name() string {
return mb.name
}
// String renders the name and directory path of the mailbox
func (mb *FileMailbox) String() string {
return mb.name + "[" + mb.dirName + "]"
}
@@ -184,11 +186,11 @@ func (mb *FileMailbox) GetMessage(id string) (datastore.Message, error) {
if id == "latest" && len(mb.messages) != 0 {
return mb.messages[len(mb.messages)-1], nil
} else {
for _, m := range mb.messages {
if m.Fid == id {
return m, nil
}
}
for _, m := range mb.messages {
if m.Fid == id {
return m, nil
}
}