1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2026-01-30 00:12: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

@@ -164,7 +164,7 @@ func (m *Manager) updateSessionState() error {
}
}
if v, ok := props["User"]; ok {
if userArr, ok := v.Value().([]interface{}); ok && len(userArr) >= 1 {
if userArr, ok := v.Value().([]any); ok && len(userArr) >= 1 {
if uid, ok := userArr[0].(uint32); ok {
m.state.User = uid
}
@@ -201,7 +201,7 @@ func (m *Manager) updateSessionState() error {
}
}
if v, ok := props["Seat"]; ok {
if seatArr, ok := v.Value().([]interface{}); ok && len(seatArr) >= 1 {
if seatArr, ok := v.Value().([]any); ok && len(seatArr) >= 1 {
if seatID, ok := seatArr[0].(string); ok {
m.state.Seat = seatID
}