1
0
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:
Marcus Ramberg
2025-12-01 17:04:37 +01:00
committed by GitHub
parent cfc07f4411
commit 94851a51aa
60 changed files with 336 additions and 334 deletions

View File

@@ -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) {

View File

@@ -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)