From a83befa0d111a0ba6fac52d763e93c76a2ef94d4 Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Fri, 19 Dec 2025 12:52:30 +0100 Subject: all: use any instead of interface{} Any is the preferred over interface{} now in Go. --- dashboard/dashapi/dashapi.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'dashboard/dashapi') diff --git a/dashboard/dashapi/dashapi.go b/dashboard/dashapi/dashapi.go index 1f9dec94d..84b90eb97 100644 --- a/dashboard/dashapi/dashapi.go +++ b/dashboard/dashapi/dashapi.go @@ -54,7 +54,7 @@ func New(client, addr, key string, opts ...DashboardOpts) (*Dashboard, error) { type ( RequestCtor func(method, url string, body io.Reader) (*http.Request, error) RequestDoer func(req *http.Request) (*http.Response, error) - RequestLogger func(msg string, args ...interface{}) + RequestLogger func(msg string, args ...any) ) // key == "" indicates that the ambient GCE service account authority @@ -407,7 +407,7 @@ type LogEntry struct { } // Centralized logging on dashboard. -func (dash *Dashboard) LogError(name, msg string, args ...interface{}) { +func (dash *Dashboard) LogError(name, msg string, args ...any) { req := &LogEntry{ Name: name, Text: fmt.Sprintf(msg, args...), @@ -988,7 +988,7 @@ type JobInfo struct { OnMergeBase bool } -func (dash *Dashboard) Query(method string, req, reply interface{}) error { +func (dash *Dashboard) Query(method string, req, reply any) error { if dash.logger != nil { dash.logger("API(%v): %#v", method, req) } @@ -1008,7 +1008,7 @@ func (dash *Dashboard) Query(method string, req, reply interface{}) error { return nil } -func (dash *Dashboard) queryImpl(method string, req, reply interface{}) error { +func (dash *Dashboard) queryImpl(method string, req, reply any) error { if reply != nil { // json decoding behavior is somewhat surprising // (see // https://github.com/golang/go/issues/21092). -- cgit mrf-deployment