1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2026-01-28 23:42:51 -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

@@ -47,8 +47,8 @@ type ServerInfo struct {
}
type ServiceEvent struct {
Service string `json:"service"`
Data interface{} `json:"data"`
Service string `json:"service"`
Data any `json:"data"`
}
var networkManager *network.Manager
@@ -485,7 +485,7 @@ func handleSubscribe(conn net.Conn, req models.Request) {
clientID := fmt.Sprintf("meta-client-%p", conn)
var services []string
if servicesParam, ok := req.Params["services"].([]interface{}); ok {
if servicesParam, ok := req.Params["services"].([]any); ok {
for _, s := range servicesParam {
if str, ok := s.(string); ok {
services = append(services, str)