mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-01-27 06:52:50 -05:00
core: replace all use of interface{} with any (#848)
This commit is contained in:
@@ -7,9 +7,9 @@ import (
|
||||
)
|
||||
|
||||
type Request struct {
|
||||
ID interface{} `json:"id"`
|
||||
Method string `json:"method"`
|
||||
Params map[string]interface{} `json:"params"`
|
||||
ID any `json:"id"`
|
||||
Method string `json:"method"`
|
||||
Params map[string]any `json:"params"`
|
||||
}
|
||||
|
||||
func HandleRequest(conn net.Conn, req Request, m *Manager) {
|
||||
|
||||
@@ -56,7 +56,7 @@ func TestHandleRequest(t *testing.T) {
|
||||
req := Request{
|
||||
ID: 123,
|
||||
Method: "evdev.getState",
|
||||
Params: map[string]interface{}{},
|
||||
Params: map[string]any{},
|
||||
}
|
||||
|
||||
HandleRequest(conn, req, m)
|
||||
@@ -85,7 +85,7 @@ func TestHandleRequest(t *testing.T) {
|
||||
req := Request{
|
||||
ID: 456,
|
||||
Method: "evdev.unknownMethod",
|
||||
Params: map[string]interface{}{},
|
||||
Params: map[string]any{},
|
||||
}
|
||||
|
||||
HandleRequest(conn, req, m)
|
||||
@@ -114,7 +114,7 @@ func TestHandleGetState(t *testing.T) {
|
||||
req := Request{
|
||||
ID: 789,
|
||||
Method: "evdev.getState",
|
||||
Params: map[string]interface{}{},
|
||||
Params: map[string]any{},
|
||||
}
|
||||
|
||||
handleGetState(conn, req, m)
|
||||
|
||||
Reference in New Issue
Block a user