Extract safecsv writer for spreadsheet-safe exports

Wrap encoding/csv with formula-safe cell sanitization and
use it from log export streaming.

Signed-off-by: Cursor Agent <cursoragent@cursor.com>

Co-authored-by: Bryan FRIMIN <bryan@frimin.fr>
This commit is contained in:
Cursor Agent
2026-07-30 06:36:35 +00:00
parent c5b1f210d5
commit fc54faa263
6 changed files with 160 additions and 41 deletions

View File

@@ -33,16 +33,6 @@ func TestUniqueNonEmptyStrings(t *testing.T) {
assert.Equal(t, []string{"a", "b"}, got)
}
func TestCsvSafeCell(t *testing.T) {
t.Parallel()
assert.Equal(t, "plain", csvSafeCell("plain"))
assert.Equal(t, "'=1+1", csvSafeCell("=1+1"))
assert.Equal(t, "'+cmd", csvSafeCell("+cmd"))
assert.Equal(t, "'-2", csvSafeCell("-2"))
assert.Equal(t, "'@sum", csvSafeCell("@sum"))
}
func TestScimEmailFromUserName(t *testing.T) {
t.Parallel()