- Fix issue #94

- Fix linter
- Remove useless code/deadcode
This commit is contained in:
Nicolas JUHEL
2021-04-13 13:08:49 +02:00
parent 499b5ee613
commit dbb443eb65
48 changed files with 673 additions and 1418 deletions

View File

@@ -28,16 +28,16 @@ package mail
type Encoding uint8
const (
// EncodingNone turns off encoding on the message body
// EncodingNone turns off encoding on the message body.
EncodingNone Encoding = iota
// EncodingBinary is equal to EncodingNone, but string is set to binrary instead of none
// EncodingBinary is equal to EncodingNone, but string is set to binary instead of none.
EncodingBinary
// EncodingBase64 sets the message body encoding to base64
// EncodingBase64 sets the message body encoding to base64.
EncodingBase64
// EncodingQuotedPrintable sets the message body encoding to quoted-printable
// EncodingQuotedPrintable sets the message body encoding to quoted-printable.
EncodingQuotedPrintable
)
@@ -54,16 +54,3 @@ func (e Encoding) String() string {
}
return EncodingNone.String()
}
func (e Encoding) getEncoding() string {
switch e {
case EncodingNone, EncodingBinary:
return "binary"
case EncodingBase64:
return "base64"
case EncodingQuotedPrintable:
return "quoted-printable"
}
return EncodingNone.getEncoding()
}