mirror of
https://github.com/emersion/go-imap
synced 2026-07-01 16:54:39 +00:00
* Rename imap.Atom to imap.RawString See https://github.com/emersion/go-imap/issues/242#issuecomment-498757425. * Don't write string as atom * all: Use imap.RawString where needed * Drop imap.Quoted * Format INBOX name as atom * server: Don't quote INBOX in LIST and STATUS responses * Revert StatusRespCode change
21 lines
400 B
Go
21 lines
400 B
Go
package responses
|
|
|
|
import (
|
|
"github.com/emersion/go-imap"
|
|
)
|
|
|
|
// A CAPABILITY response.
|
|
// See RFC 3501 section 7.2.1
|
|
type Capability struct {
|
|
Caps []string
|
|
}
|
|
|
|
func (r *Capability) WriteTo(w *imap.Writer) error {
|
|
fields := []interface{}{imap.RawString("CAPABILITY")}
|
|
for _, cap := range r.Caps {
|
|
fields = append(fields, imap.RawString(cap))
|
|
}
|
|
|
|
return imap.NewUntaggedResp(fields).WriteTo(w)
|
|
}
|