mirror of https://github.com/jetkvm/kvm.git
chore: fix linting issue
This commit is contained in:
parent
0ba7902f82
commit
334b3bee60
|
@ -3,6 +3,7 @@ package kvm
|
||||||
import (
|
import (
|
||||||
"bytes"
|
"bytes"
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
"io"
|
"io"
|
||||||
"net"
|
"net"
|
||||||
|
@ -91,7 +92,11 @@ func CallCtrlAction(action string, params map[string]interface{}) (*CtrlResponse
|
||||||
case response := <-responseChan:
|
case response := <-responseChan:
|
||||||
delete(ongoingRequests, seq)
|
delete(ongoingRequests, seq)
|
||||||
if response.Error != "" {
|
if response.Error != "" {
|
||||||
return nil, ErrorfL(&scopedLogger, "error native response: %s", fmt.Errorf(response.Error))
|
return nil, ErrorfL(
|
||||||
|
&scopedLogger,
|
||||||
|
"error native response: %s",
|
||||||
|
errors.New(response.Error),
|
||||||
|
)
|
||||||
}
|
}
|
||||||
return response, nil
|
return response, nil
|
||||||
case <-time.After(5 * time.Second):
|
case <-time.After(5 * time.Second):
|
||||||
|
|
Loading…
Reference in New Issue