(value any)
| 385 | } |
| 386 | |
| 387 | func scalarCSVValue(value any) string { |
| 388 | switch v := value.(type) { |
| 389 | case nil: |
| 390 | return "" |
| 391 | case string: |
| 392 | return v |
| 393 | case json.Number: |
| 394 | return v.String() |
| 395 | case bool: |
| 396 | if v { |
| 397 | return "true" |
| 398 | } |
| 399 | return "false" |
| 400 | default: |
| 401 | return fmt.Sprint(v) |
| 402 | } |
| 403 | } |
| 404 | |
| 405 | func isBodyColumn(column string) bool { |
| 406 | return column == "body" || strings.HasSuffix(column, ".body") |
no test coverage detected