lint: optional json structs must be ptrs
This commit is contained in:
parent
20f5db7e50
commit
59811adafe
6
model.go
6
model.go
|
@ -72,19 +72,19 @@ type message struct {
|
|||
Op string `json:"op"`
|
||||
GuildID string `json:"guildId,omitempty"`
|
||||
SessionID string `json:"sessionId,omitempty"`
|
||||
Event VoiceServerUpdate `json:"event,omitempty"`
|
||||
Event *VoiceServerUpdate `json:"event,omitempty"`
|
||||
Track string `json:"track,omitempty"`
|
||||
StartTime string `json:"startTime,omitempty"`
|
||||
EndTime string `json:"endTime,omitempty"`
|
||||
Pause bool `json:"pause,omitempty"`
|
||||
Position int `json:"position,omitempty"`
|
||||
Volume int `json:"volume,omitempty"`
|
||||
State state `json:"state,omitempty"`
|
||||
State *state `json:"state,omitempty"`
|
||||
Type string `json:"type,omitempty"`
|
||||
Reason string `json:"reason,omitempty"`
|
||||
Error string `json:"error,omitempty"`
|
||||
ThresholdMs int `json:"thresholdMs,omitempty"`
|
||||
StatCPU statCPU `json:"cpu,omitempty"`
|
||||
StatCPU *statCPU `json:"cpu,omitempty"`
|
||||
// TODO: stats
|
||||
}
|
||||
|
||||
|
|
2
node.go
2
node.go
|
@ -144,7 +144,7 @@ func (node *Node) CreatePlayer(guildID string, sessionID string, event VoiceServ
|
|||
Op: opVoiceUpdate,
|
||||
GuildID: guildID,
|
||||
SessionID: sessionID,
|
||||
Event: event,
|
||||
Event: &event,
|
||||
}
|
||||
data, err := json.Marshal(msg)
|
||||
if err != nil {
|
||||
|
|
Loading…
Reference in New Issue