From 0cae2d0b8f402b850903bd3dfd21158945ea22fa Mon Sep 17 00:00:00 2001 From: zarazaex69 Date: Wed, 6 May 2026 19:55:09 +0300 Subject: [PATCH] fix: golangci errors --- internal/client/client.go | 8 ++++---- internal/provider/telemost/peer.go | 2 +- internal/server/server.go | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/internal/client/client.go b/internal/client/client.go index bbb77ad..cddebf8 100644 --- a/internal/client/client.go +++ b/internal/client/client.go @@ -359,10 +359,10 @@ func (c *Client) tunnel(conn net.Conn, sess *smux.Session, targetAddr string, ta func (c *Client) sendConnectRequest(stream *smux.Stream, targetAddr string, targetPort int) error { connectReq, err := json.Marshal(map[string]any{ - "cmd": "connect", - "client_id": c.clientID, - "addr": targetAddr, - "port": targetPort, + "cmd": "connect", + "clientId": c.clientID, + "addr": targetAddr, + "port": targetPort, }) if err != nil { return fmt.Errorf("sid=%d marshal connect req: %w", stream.ID(), err) diff --git a/internal/provider/telemost/peer.go b/internal/provider/telemost/peer.go index b83d8f5..49506ed 100644 --- a/internal/provider/telemost/peer.go +++ b/internal/provider/telemost/peer.go @@ -676,7 +676,7 @@ func (p *Peer) sendSetSlots() error { // generous number of slots so each subscriber can receive every active // publisher in the room. slots := make([]map[string]int, 0, 8) - for i := 0; i < 8; i++ { + for range 8 { slots = append(slots, map[string]int{"width": 1280, "height": 720}) } diff --git a/internal/server/server.go b/internal/server/server.go index 5302c1f..46a8490 100644 --- a/internal/server/server.go +++ b/internal/server/server.go @@ -51,7 +51,7 @@ type Server struct { // ConnectRequest is a message from the client to establish a new connection. type ConnectRequest struct { Cmd string `json:"cmd"` - ClientID string `json:"client_id"` + ClientID string `json:"clientId"` Addr string `json:"addr"` Port int `json:"port"` }