Skip to content

Commit

Permalink
textproto: Add comments to make go vet pass
Browse files Browse the repository at this point in the history
  • Loading branch information
jhillyerd committed Mar 13, 2023
1 parent 340151c commit a968184
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions internal/textproto/reader_email.go
Original file line number Diff line number Diff line change
@@ -6,6 +6,10 @@ import (
"math"
)

// ReadEmailMIMEHeader reads a MIME-style header from r.
//
// This is a modified version of the stock func that better handles the characters
// we must support in email, instead of just HTTP.
func (r *Reader) ReadEmailMIMEHeader() (MIMEHeader, error) {
return readEmailMIMEHeader(r, math.MaxInt64)
}
@@ -91,6 +95,11 @@ func readEmailMIMEHeader(r *Reader, lim int64) (MIMEHeader, error) {
}
}

// CanonicalEmailMIMEHeaderKey returns the canonical format of the
// MIME header key s.
//
// This is a modified version of the stock func that better handles the characters
// we must support in email, instead of just HTTP.
func CanonicalEmailMIMEHeaderKey(s string) string {
// Quick check for canonical encoding.
upper := true

0 comments on commit a968184

Please sign in to comment.