From 14401c831a4163d4d042bcb8c90b3fcd6e1b4756 Mon Sep 17 00:00:00 2001 From: Daniel Ponte Date: Wed, 21 Dec 2022 13:22:26 -0500 Subject: [PATCH] gofmt --- pkg/wsapi/api.go | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/pkg/wsapi/api.go b/pkg/wsapi/api.go index a15d6a4..f07cf39 100644 --- a/pkg/wsapi/api.go +++ b/pkg/wsapi/api.go @@ -23,15 +23,15 @@ var ( type Type string type MsgBase struct { - ID *int `json:"id,omitempty"` + ID *int `json:"id,omitempty"` Type Type `json:"type"` } type ( wsSession struct { - conn *websocket.Conn - b core.Blas - ec echo.Context + conn *websocket.Conn + b core.Blas + ec echo.Context write chan<- interface{} user *auth.User @@ -97,7 +97,7 @@ func (ws *wsSession) Go(ctx context.Context) error { if err != nil { return err } - + _, rdr, err := ws.conn.NextReader() if err != nil { return err @@ -213,13 +213,13 @@ func (ws *wsSession) handleMsg(ctx context.Context, msgMap map[string]interface{ idFl, ok := msgMap["id"].(float64) if !ok { ws.Write(WSError{ - Type: ResultMsgType, - Success: false, - Error: Error{ - Code: "invalid_id", - Message: "command has no ID", - }, - }) + Type: ResultMsgType, + Success: false, + Error: Error{ + Code: "invalid_id", + Message: "command has no ID", + }, + }) return nil }