Files
go-imap/responses/capability.go
T
fox.cppandSimon Ser 5511b755bd Explicit separation for quoted strings and atoms (#261)
* 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
2019-06-06 10:44:50 +03:00

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)
}