This is the v1 version, had the v2 before.

This commit is contained in:
2025-05-01 12:02:19 +03:00
parent bcc3f95e8e
commit 0e253ba422
130 changed files with 18061 additions and 2179 deletions

28
commands/enable.go Normal file
View File

@@ -0,0 +1,28 @@
package commands
import (
"github.com/emersion/go-imap"
)
// An ENABLE command, defined in RFC 5161 section 3.1.
type Enable struct {
Caps []string
}
func (cmd *Enable) Command() *imap.Command {
args := make([]interface{}, len(cmd.Caps))
for i, c := range cmd.Caps {
args[i] = imap.RawString(c)
}
return &imap.Command{
Name: "ENABLE",
Arguments: args,
}
}
func (cmd *Enable) Parse(fields []interface{}) error {
var err error
cmd.Caps, err = imap.ParseStringList(fields)
return err
}