refactor: move broadcast.Message to shared.Message
- create a new shared state file to manage message state
- replace broadcast.Message with shared.Message in pomodoro logic
- update websocket client handling to use shared.Clients
- remove unnecessary broadcast imports from various files
- ensure consistent message handling across the application
🤖
This commit is contained in:
parent
234f3c17dc
commit
aab6896c7d
6 changed files with 44 additions and 40 deletions
14
internal/shared/state.go
Normal file
14
internal/shared/state.go
Normal file
|
@ -0,0 +1,14 @@
|
|||
package shared
|
||||
|
||||
import (
|
||||
"git.smsvc.net/pomodoro/GoTomato/pkg/models"
|
||||
)
|
||||
|
||||
var Message = models.ServerMessage{
|
||||
Mode: "none",
|
||||
Session: 0,
|
||||
TotalSession: 0,
|
||||
TimeLeft: 0,
|
||||
Ongoing: false,
|
||||
Paused: false,
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue