============================================================================= JSONWriter - JSON格式写入器 ============================================================================= JSONWriter JSON格式写入器(分类去重,输出完整JSON) 双写机制:内存分类缓冲 + 实时NDJSON备份
| 423 | // JSONWriter JSON格式写入器(分类去重,输出完整JSON) |
| 424 | // 双写机制:内存分类缓冲 + 实时NDJSON备份 |
| 425 | type JSONWriter struct { |
| 426 | file *os.File |
| 427 | mu sync.Mutex |
| 428 | closed bool |
| 429 | buffer *ResultBuffer |
| 430 | realtimeFile *os.File // 实时备份文件(NDJSON格式) |
| 431 | realtimePath string // 实时备份文件路径 |
| 432 | } |
| 433 | |
| 434 | // JSONOutput JSON输出结构 |
| 435 | type JSONOutput struct { |
nothing calls this directly
no outgoing calls
no test coverage detected