Documentation
¶
Overview ¶
Package headers reads and writes MIME headers while preserving the header order and folding style used by Blink-generated MHTML files.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Ordered ¶
Ordered calls f for each header in headers: first the well-known keys in OrderedKeys order, then any remaining keys sorted alphabetically so output is deterministic.
func OrderedKeys ¶
func OrderedKeys() []string
OrderedKeys returns the header order used by Blink-generated MHTML files. Writing headers in this order keeps output byte-identical to Chrome's.
func Scan ¶
func Scan(scanner *bufio.Scanner, headers *textproto.MIMEHeader) error
Scan reads a header block from scanner into headers. It stops at the first blank line after at least one header has been read (blank lines before the block are tolerated). Folded continuation lines (starting with a tab or space) are unfolded into the preceding header value.
Scan returns nil when the block ends normally and io.EOF when the input ends before a terminating blank line.
Types ¶
This section is empty.