Refactor configuration and update handling:

- Modify .luarc.json to include global Lua scripts.
- Update Makefile to include LDFLAGS for versioning.
- Enhance node.go to implement version checking and update handling.
- Refactor Lua global variables in _globals.lua and echo.lua to use new structures.
- Remove deprecated http.lua and update config.yaml for TLS and update settings.
- Introduce new update.go for version management and update checking.
- Add tests for version comparison in update_test.go.
- Improve error handling in various server methods.
This commit is contained in:
alex
2025-07-03 22:38:05 +03:00
parent 96fb13e3c7
commit d442871950
19 changed files with 527 additions and 143 deletions

View File

@@ -104,5 +104,8 @@ func (h *HandlerV1) _handleList() {
log.Info("Session completed")
h.w.Header().Set("Content-Type", "application/json")
json.NewEncoder(h.w).Encode(commands)
if err := json.NewEncoder(h.w).Encode(commands); err != nil {
h.log.Error("Failed to write JSON error response",
slog.String("error", err.Error()))
}
}