mirror of
https://github.com/wneessen/go-mail.git
synced 2024-11-22 13:50:49 +01:00
*Reader() methods don't need to check for nil, as the underlying fileFromReader does never return nil
This commit is contained in:
parent
a734a65b2e
commit
b6d90eac6a
1 changed files with 0 additions and 6 deletions
6
msg.go
6
msg.go
|
@ -432,9 +432,6 @@ func (m *Msg) AttachFile(n string, o ...FileOption) {
|
||||||
// AttachReader adds an attachment File via io.Reader to the Msg
|
// AttachReader adds an attachment File via io.Reader to the Msg
|
||||||
func (m *Msg) AttachReader(n string, r io.Reader, o ...FileOption) {
|
func (m *Msg) AttachReader(n string, r io.Reader, o ...FileOption) {
|
||||||
f := fileFromReader(n, r)
|
f := fileFromReader(n, r)
|
||||||
if f == nil {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
m.attachments = m.appendFile(m.attachments, f, o...)
|
m.attachments = m.appendFile(m.attachments, f, o...)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -450,9 +447,6 @@ func (m *Msg) EmbedFile(n string, o ...FileOption) {
|
||||||
// EmbedReader adds an embedded File from an io.Reader to the Msg
|
// EmbedReader adds an embedded File from an io.Reader to the Msg
|
||||||
func (m *Msg) EmbedReader(n string, r io.Reader, o ...FileOption) {
|
func (m *Msg) EmbedReader(n string, r io.Reader, o ...FileOption) {
|
||||||
f := fileFromReader(n, r)
|
f := fileFromReader(n, r)
|
||||||
if f == nil {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
m.embeds = m.appendFile(m.embeds, f, o...)
|
m.embeds = m.appendFile(m.embeds, f, o...)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue