Rename set message to set flags

This commit is contained in:
Blallo 2021-04-05 19:56:55 +02:00
parent ab498f7091
commit a3430dfdf2
No known key found for this signature in database
GPG key ID: 0CBE577C9B72DC3F

View file

@ -17,7 +17,7 @@ var setVerbs cli.CommandMap
func init() {
setVerbs = cli.CommandMap{
"message": SetMessageCmd{},
"flags": SetFlagsCmd{},
// "subscribe": SetSubscribedCmd{},
// "unsubscribe": SetUnsubscribedCmd{},
}
@ -52,9 +52,9 @@ func (s SetCmd) Help(w io.Writer, set *flag.FlagSet) {
// VERBS
type SetMessageCmd struct{}
type SetFlagsCmd struct{}
func (sm SetMessageCmd) Func(args []string) error {
func (sm SetFlagsCmd) Func(args []string) error {
if Session.Info.Opts.Debug {
Log.Debug("enter set message")
}
@ -118,7 +118,7 @@ func (sm SetMessageCmd) Func(args []string) error {
return imaputils.SetFlags(Session.Config, &opts)
}
func (sm SetMessageCmd) Help(w io.Writer, set *flag.FlagSet) {
func (sm SetFlagsCmd) Help(w io.Writer, set *flag.FlagSet) {
fmt.Fprintf(w, "USAGE: %s set message [opts] MAILBOX MESSAGE_ID_OR_RANGE [MESSAGE_ID_OR_RANGE [MESSAGE_ID_OR_RANGE ...]]\n", Session.Info.Name)
fmt.Fprintln(w, "\nMESSAGE_ID_OR_RANGE being a single message id or a git-like range")
fmt.Fprintln(w, "Example:")