util

package
v0.0.0-...-2cecdb2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 30, 2018 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const InternalDate = "02-Jan-2006 15:04:05 +0700"

Date format used in INTERNALDATE fetch parameter

View Source
const RFC822Date = "Mon, 2 Jan 2006 15:04:05 +0700"

RFC822 date format used by IMAP in go date format

Variables

This section is empty.

Functions

func FormatDate

func FormatDate(date time.Time) string

FormatDate formats the given date in the RFC822 format.

func MIMEHeaderToString

func MIMEHeaderToString(header textproto.MIMEHeader) string

MIMEHeaderToString converts a textproto.MIMEHeader into its string representation.

func SplitParams

func SplitParams(params string) []string

SplitParams splits parameters in IMAP arguments so that they're easily readable.

func WriteMIMEHeader

func WriteMIMEHeader(writer io.Writer, header textproto.MIMEHeader) (n int, err error)

WriteMIMEHeader writes the MIME header out in the standard format. This should eventually be superseded by textproto.MIMEHeader.Write(w) once it is implemented in the go standard library.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL