Syntax matching sugar

This commit is contained in:
Chris Rice 2023-07-06 16:29:40 -07:00
parent ec47a58ba1
commit 564b64a758
1 changed files with 1 additions and 1 deletions

View File

@ -206,7 +206,7 @@ func (s *Server) liveSubscription(
}
}
writePing := func() {
switch msg.OutputType {
switch outputType {
case JSON:
if len(msg.Args) > 1 {
write([]byte(`{"ok":true,"ping":` + jsonString(msg.Args[1]) + `,"elapsed":"` + time.Since(start).String() + `"}`))