File: enable.go

package info (click to toggle)
golang-github-emersion-go-imap 1.2.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 840 kB
  • sloc: makefile: 2
file content (23 lines) | stat: -rw-r--r-- 428 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
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 {
	return &imap.Command{
		Name:      "ENABLE",
		Arguments: imap.FormatStringList(cmd.Caps),
	}
}

func (cmd *Enable) Parse(fields []interface{}) error {
	var err error
	cmd.Caps, err = imap.ParseStringList(fields)
	return err
}