Versions in this module Expand all Collapse all v0 v0.0.1 Mar 28, 2024 Changes in this version + const CRLF + const MaxAtomLength + const MaxLineLength + const MaxLineOverlength + const MessageIdEntropy + const TimeLayout + var EOH = fmt.Errorf("%w: end of header", io.EOF) + var ErrMalformedField = errors.New("malformed field") + var ErrNotCRLFTerminated = errors.New("not CRLF-terminated") + func CopyMIMEHeader(header textproto.MIMEHeader) textproto.MIMEHeader + func Fields2Mimeheader(fields []Field) textproto.MIMEHeader + func JoinFields(fn string, fields []Field) string + func SplitHeaderPartial(r io.Reader, fieldNames ...string) (textproto.MIMEHeader, error) + type Field struct + Body string + Name string + func Isolator(fn string) Field + func Mimeheader2Fields(h textproto.MIMEHeader) []Field + func Split(r io.Reader) ([]Field, io.Reader, error) + func (field Field) CanonicalName() string + func (field Field) Encode() []byte + func (field Field) Equal(other Field) bool + func (field Field) Is(name string) bool + func (field Field) IsZero() bool + type Part struct + Content []byte + ContentDisposition string + ContentLanguage string + ContentType string + func (part *Part) Encode(encoding string) ([]Field, []byte, error) + type RawField []byte + func (rawfield RawField) CanonicalName() string + func (rawfield RawField) Decode() (Field, error) + func (rawfield RawField) Is(fh string) bool + type Splitter struct + func NewSplitter(r io.Reader) *Splitter + func (s *Splitter) NextField() (Field, error) + func (s *Splitter) NextRawField() (RawField, error) + func (s *Splitter) Read(p []byte) (int, error)