refactor: tidier encoding detection

This commit is contained in:
James Houlahan
2020-08-17 17:09:34 +02:00
parent f4dfadce52
commit 6a7a77fc51
4 changed files with 35 additions and 42 deletions

View File

@ -33,7 +33,7 @@ func TestParserWrite(t *testing.T) {
buf := new(bytes.Buffer)
assert.NoError(t, w.Write(buf))
assert.Equal(t, s("text_html_octet_attachment.eml"), crlf(buf.String()))
assert.Equal(t, getFileAsString("text_html_octet_attachment.eml"), crlf(buf.String()))
}
func crlf(s string) string {