diff options
| author | Dmitry Vyukov <dvyukov@google.com> | 2025-12-19 12:52:30 +0100 |
|---|---|---|
| committer | Aleksandr Nogikh <nogikh@google.com> | 2025-12-22 02:13:00 +0000 |
| commit | a83befa0d111a0ba6fac52d763e93c76a2ef94d4 (patch) | |
| tree | 7d3c28b24229429936a631e8ceb24135856b257d /dashboard/dashapi | |
| parent | 8fb7048c5117ccb592deb5e8e4a62027e6d399cf (diff) | |
all: use any instead of interface{}
Any is the preferred over interface{} now in Go.
Diffstat (limited to 'dashboard/dashapi')
| -rw-r--r-- | dashboard/dashapi/dashapi.go | 8 |
1 files changed, 4 insertions, 4 deletions
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). |
