aboutsummaryrefslogtreecommitdiff
path: root/hotline/news.go
AgeCommit message (Collapse)Author
2025-07-05Add comprehensive test coverage for news.go functionsJeff Halter
- Add table-driven tests for GetNewsArtListData, DataSize, NewsArtListData.Read, NewsArtList.Read, and newsPathScanner - Improve test coverage from 0% to 87.5%-100% for these functions - Add test for Field.DecodeNewsPath function - Fix NewsArtList.Read to return nil instead of io.EOF for proper io.Reader behavior - Add constants for NewsFlavorCount and improve code documentation
2025-06-30Replace inappropriate panic calls with proper error handlingJeff Halter
- Convert panic in news article processing to return error instead - Replace panic in API stats endpoint with HTTP error response - Update ThreadedNewsMgr interface to return errors from ListArticles - Ensure server stability by handling errors gracefully
2024-07-17Extensive refactor, quality of life enhancementsJeff Halter
* Added ability to reload config, agreement, news, and user accounts without restarting the server by sending SIGHUP to the running process * Added ability to use modern unix or windows line breaks in Agreement.txt and MessageBoard.txt instead of classic MacOS `\r` breaks. * Extensive refactor towards swappable backends for the active server state * Extensive refactored towards making the hotline package generic and re-usable for alternate server implemenations * Fix bug where users whose accounts have been deleted would not be disconnected
2024-07-09Extensive refactor and clean upJeff Halter
2024-06-24Refactoring, cleanup, test backfillingJeff Halter
2024-06-16Fix broken io.Reader implementationsJeff Halter
2024-06-15Refactoring and cleanupJeff Halter
* Split CLI client into separate project * Convert more functions to follow common Golang idioms e.g io.Reader, io.Writer * Use ldflags for versioning * Misc cleanup and simplification
2024-06-09Convert more bespoke methods to io.Reader/io.Writer interfacesJeff Halter
2023-01-21Minor cleanupJeff Halter
2023-01-18Fix threaded news bugsJeff Halter
1. Fix handling of article IDs sent as 4 bytes instead of 2 2. Fix incorrect article count listing that strangely only affects third party clients
2022-06-28Implement access controls for threaded news item deletionJeff Halter
2022-05-28Misc cleanupJeff Halter
* Removed some unnecessary user of pointers * Removed dead cruft * Reorganized code
2022-05-27Simplify news article timestampingJeff Halter
2021-08-10Add tests and clean upJeff Halter
2021-07-28Move code to hotline dirJeff Halter