fix gofmt error
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
This commit is contained in:
parent
d0490c187c
commit
6510e57758
7 changed files with 27 additions and 28 deletions
|
@ -90,5 +90,5 @@ func transformKey(key string) string {
|
|||
return key
|
||||
}
|
||||
|
||||
return filepath.Join(key[0:2], key[2:4], key[4:len(key)])
|
||||
return filepath.Join(key[0:2], key[2:4], key[4:])
|
||||
}
|
||||
|
|
|
@ -220,12 +220,12 @@ func (s *sendmailSender) Send(from string, to []string, msg io.WriterTo) error {
|
|||
return err
|
||||
}
|
||||
|
||||
_,err = msg.WriteTo(pipe)
|
||||
_, err = msg.WriteTo(pipe)
|
||||
|
||||
// we MUST close the pipe or sendmail will hang waiting for more of the message
|
||||
// Also we should wait on our sendmail command even if something fails
|
||||
closeError = pipe.Close()
|
||||
waitError = cmd.Wait()
|
||||
waitError = cmd.Wait()
|
||||
if err != nil {
|
||||
return err
|
||||
} else if closeError != nil {
|
||||
|
@ -263,7 +263,6 @@ func NewContext() {
|
|||
return
|
||||
}
|
||||
|
||||
|
||||
if setting.MailService.UseSendmail {
|
||||
Sender = &sendmailSender{}
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue