Skip to content

Commit b582fd9

Browse files
committed
Use new type for generic interfaces
1 parent 806601a commit b582fd9

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

src/config/chat.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,6 @@ type ClickEvent struct {
5353

5454
// HoverEvent is a Minecraft `hoverEvent` serialized in the Chat object.
5555
type HoverEvent struct {
56-
Action string `yaml:"action" json:"action"`
57-
Contents interface{} `yaml:"contents" json:"contents"`
56+
Action string `yaml:"action" json:"action"`
57+
Contents any `yaml:"contents" json:"contents"`
5858
}

src/java/status.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,9 @@ type legacyMod struct {
4242
}
4343

4444
type forgeData struct {
45-
Channels []interface{} `json:"channels"`
46-
Mods []forgeMod `json:"mods"`
47-
FMLNetworkVersion int `json:"fmlNetworkVersion"`
45+
Channels []any `json:"channels"`
46+
Mods []forgeMod `json:"mods"`
47+
FMLNetworkVersion int `json:"fmlNetworkVersion"`
4848
}
4949

5050
type forgeMod struct {
@@ -89,7 +89,7 @@ func getStatusResponse() (result status) {
8989
{
9090
result.ForgeData = &forgeData{
9191
FMLNetworkVersion: 2,
92-
Channels: make([]interface{}, 0),
92+
Channels: make([]any, 0),
9393
Mods: make([]forgeMod, 0),
9494
}
9595

0 commit comments

Comments
 (0)