(path string)
| 96 | } |
| 97 | |
| 98 | func sendFullContent(path string) { |
| 99 | content, err := os.ReadFile(path) |
| 100 | if err != nil { |
| 101 | return |
| 102 | } |
| 103 | |
| 104 | msg, _ := json.Marshal(fiber.Map{ |
| 105 | "type": "full-content-update", |
| 106 | "content": string(content), |
| 107 | "timestamp": time.Now().Unix(), |
| 108 | }) |
| 109 | |
| 110 | utils.SendToAll(path, websocket.TextMessage, msg) |
| 111 | } |
| 112 | |
| 113 | func sendReloadNotification(path string) { |
| 114 | msg, _ := json.Marshal(fiber.Map{ |
no test coverage detected