aboutsummaryrefslogtreecommitdiffstats
path: root/vm
diff options
context:
space:
mode:
authorDmitry Vyukov <dvyukov@google.com>2025-12-19 12:52:30 +0100
committerAleksandr Nogikh <nogikh@google.com>2025-12-22 02:13:00 +0000
commita83befa0d111a0ba6fac52d763e93c76a2ef94d4 (patch)
tree7d3c28b24229429936a631e8ceb24135856b257d /vm
parent8fb7048c5117ccb592deb5e8e4a62027e6d399cf (diff)
all: use any instead of interface{}
Any is the preferred over interface{} now in Go.
Diffstat (limited to 'vm')
-rw-r--r--vm/proxyapp/proxyappclient.go6
-rw-r--r--vm/qemu/qmp.go10
2 files changed, 8 insertions, 8 deletions
diff --git a/vm/proxyapp/proxyappclient.go b/vm/proxyapp/proxyappclient.go
index 4ffa12b57..c3740ce6a 100644
--- a/vm/proxyapp/proxyappclient.go
+++ b/vm/proxyapp/proxyappclient.go
@@ -300,7 +300,7 @@ func (proxy *ProxyApp) signalLostConnection() {
}
}
-func (proxy *ProxyApp) Call(serviceMethod string, args, reply interface{}) error {
+func (proxy *ProxyApp) Call(serviceMethod string, args, reply any) error {
err := proxy.Client.Call(serviceMethod, args, reply)
if err == rpc.ErrShutdown {
proxy.signalLostConnection()
@@ -589,8 +589,8 @@ type stdInOutCloser struct {
io.Writer
}
-func clientErrorf(writer io.Writer) func(fmt string, s ...interface{}) {
- return func(f string, s ...interface{}) {
+func clientErrorf(writer io.Writer) func(fmt string, s ...any) {
+ return func(f string, s ...any) {
fmt.Fprintf(writer, f, s...)
writer.Write([]byte("\nSYZFAIL: proxy app plugin error\n"))
}
diff --git a/vm/qemu/qmp.go b/vm/qemu/qmp.go
index 4cd8d2de1..d24314893 100644
--- a/vm/qemu/qmp.go
+++ b/vm/qemu/qmp.go
@@ -29,8 +29,8 @@ type qmpBanner struct {
}
type qmpCommand struct {
- Execute string `json:"execute"`
- Arguments interface{} `json:"arguments,omitempty"`
+ Execute string `json:"execute"`
+ Arguments any `json:"arguments,omitempty"`
}
type hmpCommand struct {
@@ -43,10 +43,10 @@ type qmpResponse struct {
Class string
Desc string
}
- Return interface{}
+ Return any
Event string
- Data map[string]interface{}
+ Data map[string]any
Timestamp struct {
Seconds int64
Microseconds int64
@@ -102,7 +102,7 @@ func (inst *instance) doQmp(cmd *qmpCommand) (*qmpResponse, error) {
return inst.qmpRecv()
}
-func (inst *instance) qmp(cmd *qmpCommand) (interface{}, error) {
+func (inst *instance) qmp(cmd *qmpCommand) (any, error) {
if err := inst.qmpConnCheck(); err != nil {
return nil, err
}