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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user