diff --git a/encoding.go b/encoding.go index aa9cceb..8c38cea 100644 --- a/encoding.go +++ b/encoding.go @@ -171,20 +171,20 @@ const ( // TypeTextPlain represents the MIME type for plain text content. TypeTextPlain ContentType = "text/plain" - - // typeSMimeSigned represents the MIME type for S/MIME singed messages. - typeSMimeSigned ContentType = `application/pkcs7-signature; name="smime.p7s"` + + // typeSMimeSigned represents the MIME type for S/MIME singed messages. + typeSMimeSigned ContentType = `application/pkcs7-signature; name="smime.p7s"` ) const ( // MIMEAlternative MIMEType represents a MIME multipart/alternative type, used for emails with multiple versions. MIMEAlternative MIMEType = "alternative" - // MIMEMixed MIMEType represents a MIME multipart/mixed type used for emails containing different types of content. - MIMEMixed MIMEType = "mixed" - // MIMERelated MIMEType represents a MIME multipart/related type, used for emails with related content entities. - MIMERelated MIMEType = "related" - // MIMESMime MIMEType represents a MIME multipart/signed type, used for siging emails with S/MIME. - MIMESMime MIMEType = `signed; protocol="application/pkcs7-signature"; micalg=sha-256` + // MIMEMixed MIMEType represents a MIME multipart/mixed type used for emails containing different types of content. + MIMEMixed MIMEType = "mixed" + // MIMERelated MIMEType represents a MIME multipart/related type, used for emails with related content entities. + MIMERelated MIMEType = "related" + // MIMESMime MIMEType represents a MIME multipart/signed type, used for siging emails with S/MIME. + MIMESMime MIMEType = `signed; protocol="application/pkcs7-signature"; micalg=sha-256` ) // String satisfies the fmt.Stringer interface for the Charset type. diff --git a/part.go b/part.go index 153f281..3fab652 100644 --- a/part.go +++ b/part.go @@ -152,7 +152,6 @@ func (p *Part) SetDescription(description string) { p.description = description } - // SetIsSMimeSigned sets the flag for signing the Part with S/MIME func (p *Part) SetIsSMimeSigned(smime bool) { p.smime = smime diff --git a/smime.go b/smime.go index 62e07aa..405a5c1 100644 --- a/smime.go +++ b/smime.go @@ -11,8 +11,9 @@ import ( "encoding/pem" "errors" "fmt" - "go.mozilla.org/pkcs7" "strings" + + "go.mozilla.org/pkcs7" ) var (