Skip to content

Commit f99da3b

Browse files
committed
fix: remove unnecessary cmd len check
1 parent 3cfc1f7 commit f99da3b

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

driver/generic/sendcommands.go

+1-5
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ func (d *Driver) SendCommands(
1515
d.Logger.Infof("SendCommands requested, sending '%s'", commands)
1616

1717
if len(commands) == 0 {
18-
return nil, fmt.Errorf("%w: no commands provided", util.ErrNoOp)
18+
return nil, fmt.Errorf("%w: no inputs provided", util.ErrNoOp)
1919
}
2020

2121
op, err := NewOperation(opts...)
@@ -25,10 +25,6 @@ func (d *Driver) SendCommands(
2525

2626
m := response.NewMultiResponse(d.Transport.GetHost())
2727

28-
if len(commands) == 0 {
29-
return m, err
30-
}
31-
3228
for _, input := range commands[:len(commands)-1] {
3329
var r *response.Response
3430

0 commit comments

Comments
 (0)