fix: golangci errors

This commit is contained in:
zarazaex69
2026-05-06 19:55:09 +03:00
parent f79f610459
commit 0cae2d0b8f
3 changed files with 6 additions and 6 deletions

View File

@@ -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)

View File

@@ -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})
}

View File

@@ -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"`
}