refactor: move broadcast package to websocket
- update import paths to reflect the new package name
- change function call to use the new websocket package
- adjust client iteration to use the renamed Clients variable
🤖
This commit is contained in:
parent
aab6896c7d
commit
6ffd9f1e38
2 changed files with 3 additions and 5 deletions
|
@ -3,7 +3,6 @@ package server
|
|||
import (
|
||||
"flag"
|
||||
"fmt"
|
||||
"git.smsvc.net/pomodoro/GoTomato/internal/broadcast"
|
||||
"git.smsvc.net/pomodoro/GoTomato/internal/websocket"
|
||||
"git.smsvc.net/pomodoro/GoTomato/pkg/models"
|
||||
"log"
|
||||
|
@ -24,7 +23,7 @@ func Start() {
|
|||
listen := fmt.Sprintf("%s:%d", serverConfig.ListenAddress, serverConfig.ListenPort)
|
||||
|
||||
http.HandleFunc("/ws", websocket.HandleConnections)
|
||||
go broadcast.SendPermanentBroadCastMessage()
|
||||
go websocket.SendPermanentBroadCastMessage()
|
||||
|
||||
log.Printf("Pomodoro WebSocket server started on %s\n", listen)
|
||||
err := http.ListenAndServe(listen, nil)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue