File tree 3 files changed +4
-4
lines changed
3 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -46,7 +46,7 @@ const (
46
46
func init () {
47
47
schedule .RegisterSliceDecoderBuilder (EvictLeaderType , func (args []string ) schedule.ConfigDecoder {
48
48
return func (v interface {}) error {
49
- if len (args ) != 1 {
49
+ if len (args ) < 1 {
50
50
return errors .New ("should specify the store-id" )
51
51
}
52
52
conf , ok := v .(* evictLeaderSchedulerConfig )
@@ -98,7 +98,7 @@ type evictLeaderSchedulerConfig struct {
98
98
}
99
99
100
100
func (conf * evictLeaderSchedulerConfig ) BuildWithArgs (args []string ) error {
101
- if len (args ) != 1 {
101
+ if len (args ) < 1 {
102
102
return errors .New ("should specify the store-id" )
103
103
}
104
104
Original file line number Diff line number Diff line change @@ -98,7 +98,7 @@ func (conf *evictLeaderSchedulerConfig) getStores() []uint64 {
98
98
}
99
99
100
100
func (conf * evictLeaderSchedulerConfig ) BuildWithArgs (args []string ) error {
101
- if len (args ) != 1 {
101
+ if len (args ) < 1 {
102
102
return errs .ErrSchedulerConfig .FastGenByArgs ("id" )
103
103
}
104
104
Original file line number Diff line number Diff line change @@ -83,7 +83,7 @@ type grantLeaderSchedulerConfig struct {
83
83
}
84
84
85
85
func (conf * grantLeaderSchedulerConfig ) BuildWithArgs (args []string ) error {
86
- if len (args ) != 1 {
86
+ if len (args ) < 1 {
87
87
return errs .ErrSchedulerConfig .FastGenByArgs ("id" )
88
88
}
89
89
You can’t perform that action at this time.
0 commit comments