mirror of
https://github.com/mjl-/mox.git
synced 2025-07-12 13:04:38 +03:00
add more documentation, examples with tests to illustrate reusable components
This commit is contained in:
@ -4,8 +4,10 @@ import (
|
||||
"strings"
|
||||
)
|
||||
|
||||
// NeedsQuotedPrintable returns whether text should be encoded with
|
||||
// quoted-printable. If not, it can be included as 7bit or 8bit encoding.
|
||||
// NeedsQuotedPrintable returns whether text, with crlf-separated lines, should be
|
||||
// encoded with quoted-printable, based on line lengths and any bare carriage
|
||||
// return or bare newline. If not, it can be included as 7bit or 8bit encoding in a
|
||||
// new message.
|
||||
func NeedsQuotedPrintable(text string) bool {
|
||||
// ../rfc/2045:1025
|
||||
for _, line := range strings.Split(text, "\r\n") {
|
||||
|
Reference in New Issue
Block a user