go-imap icon indicating copy to clipboard operation
go-imap copied to clipboard

Fix string constants types

Open emersion opened this issue 4 years ago • 0 comments

String constants are declared this way:

const (
    // SetFlags replaces existing flags by new ones.
    SetFlags FlagsOp = "FLAGS"
    // AddFlags adds new flags.
    AddFlags = "+FLAGS"
    // RemoveFlags removes existing flags.
    RemoveFlags = "-FLAGS"
)

This means only the first value with have the right type, others will be string.

Fix it by specifying the type for each value. This is a breaking change.

emersion avatar Dec 21 '19 11:12 emersion