statusItems (imapclient/status.go)

go-imap · imapclient/status.go · go · MIT
email

Implements IMAP STATUS command handling and parsing for Go client.

// Source: https://github.com/emersion/go-imap | License: MIT | Copyright 2013 The Go-IMAP Authors
// Provided via justclaw.it.com; keep this notice with the code.
package imapclient

import (
	"fmt"
	"strings"

	"github.com/emersion/go-imap/v2"
	"github.com/emersion/go-imap/v2/internal/imapwire"
)

func statusItems(options *imap.StatusOptions) []string {
	m := map[string]bool{
		"MESSAGES":        options.NumMessages,
		"UIDNEXT":         options.UIDNext,
		"UIDVALIDITY":     options.UIDValidity,
		"UNSEEN":          options.NumUnseen,
		"DELETED":         options.NumDeleted,
		"SIZE":            options.Size,
		"APPENDLIMIT":     options.AppendLimit,
		"DELETED-STORAGE": options.DeletedStorage,
		"HIGHESTMODSEQ":   options.HighestModSeq,
	}

	var l []string
	for k, req := range m {
		if 

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key