mirror of
https://github.com/nabbar/golib.git
synced 2025-10-08 01:00:09 +08:00
@@ -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()
|
||||
}
|
||||
|
Reference in New Issue
Block a user