x/tools: modernize interface{} -> any
Produced with a patched version of modernize containing only the efaceany pass: $ go run ./gopls/internal/analysis/modernize/cmd/modernize/main.go -test -fix ./... ./gopls/... This is very safe and forms the bulk of the modernize diff, isolating the other changes for ease of review. Change-Id: Iec9352bac5a639a5c03368427531c7842c6e9ad0 Reviewed-on: https://go-review.googlesource.com/c/tools/+/650759 LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Robert Findley <rfindley@google.com> Auto-Submit: Alan Donovan <adonovan@google.com>
This commit is contained in:
parent
a462ac68ac
commit
47e1b0be9d
1 changed files with 46 additions and 46 deletions
|
|
@ -63,7 +63,7 @@ func TestWireMessage(t *testing.T) {
|
|||
}
|
||||
}
|
||||
|
||||
func newNotification(method string, params interface{}) jsonrpc2.Message {
|
||||
func newNotification(method string, params any) jsonrpc2.Message {
|
||||
msg, err := jsonrpc2.NewNotification(method, params)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
|
|
@ -71,7 +71,7 @@ func newNotification(method string, params interface{}) jsonrpc2.Message {
|
|||
return msg
|
||||
}
|
||||
|
||||
func newID(id interface{}) jsonrpc2.ID {
|
||||
func newID(id any) jsonrpc2.ID {
|
||||
switch v := id.(type) {
|
||||
case nil:
|
||||
return jsonrpc2.ID{}
|
||||
|
|
@ -86,7 +86,7 @@ func newID(id interface{}) jsonrpc2.ID {
|
|||
}
|
||||
}
|
||||
|
||||
func newCall(id interface{}, method string, params interface{}) jsonrpc2.Message {
|
||||
func newCall(id any, method string, params any) jsonrpc2.Message {
|
||||
msg, err := jsonrpc2.NewCall(newID(id), method, params)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
|
|
@ -94,7 +94,7 @@ func newCall(id interface{}, method string, params interface{}) jsonrpc2.Message
|
|||
return msg
|
||||
}
|
||||
|
||||
func newResponse(id interface{}, result interface{}, rerr error) jsonrpc2.Message {
|
||||
func newResponse(id any, result any, rerr error) jsonrpc2.Message {
|
||||
msg, err := jsonrpc2.NewResponse(newID(id), result, rerr)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
|
|
|
|||
Loading…
Reference in a new issue