package pop3 import ( "errors" "fmt" ) var ( // Package pop3 will never transmit credentials in the clear. ErrNoTLS = errors.New("no TLS") // E.g. maximum line length violated or unknown status indicator sent. ErrProtocol = errors.New("pop3: protocol not followed") // E.g. "+OK 5 oktets" instead of "+OK 5 octets". ErrSyntax = errors.New("pop3: wrong syntax") // POP3 semantics were not followed, e.g. message numbers are duplicated. ErrSemantics = errors.New("pop3: semantically incoherent") ) // ERR encapsulates a "-ERR" POP3 response line. type ERR struct { Diagnostics string } func (err *ERR) Error() string { return fmt.Sprintf("pop3 -ERR: %q", string(err.Diagnostics)) }