Skip to content

Commit 999137e

Browse files
authored
Fix possible panics
1 parent eeadd13 commit 999137e

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

commands/subscribe.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ func (cmd *Subscribe) Command() *imap.Command {
2222
}
2323

2424
func (cmd *Subscribe) Parse(fields []interface{}) error {
25-
if len(fields) < 0 {
25+
if len(fields) < 1 {
2626
return errors.New("No enough arguments")
2727
}
2828

@@ -50,7 +50,7 @@ func (cmd *Unsubscribe) Command() *imap.Command {
5050
}
5151

5252
func (cmd *Unsubscribe) Parse(fields []interface{}) error {
53-
if len(fields) < 0 {
53+
if len(fields) < 1 {
5454
return errors.New("No enogh arguments")
5555
}
5656

commands/uid.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ func (cmd *Uid) Command() *imap.Command {
2626
}
2727

2828
func (cmd *Uid) Parse(fields []interface{}) error {
29-
if len(fields) < 0 {
29+
if len(fields) < 1 {
3030
return errors.New("No command name specified")
3131
}
3232

0 commit comments

Comments
 (0)