chore: fix linting issue

This commit is contained in:
Siyuan Miao 2025-04-11 13:05:03 +02:00
parent 0ba7902f82
commit 334b3bee60
1 changed files with 6 additions and 1 deletions

View File

@ -3,6 +3,7 @@ package kvm
import (
"bytes"
"encoding/json"
"errors"
"fmt"
"io"
"net"
@ -91,7 +92,11 @@ func CallCtrlAction(action string, params map[string]interface{}) (*CtrlResponse
case response := <-responseChan:
delete(ongoingRequests, seq)
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
case <-time.After(5 * time.Second):