nullIfEmptyString returns nil interface when s is empty so the column is inserted as SQL NULL rather than ”. Keeps body columns distinguishable between "scrubbed" (NULL) and "empty body" once scrubbing is wired up.
(s string)
| 1474 | // inserted as SQL NULL rather than ”. Keeps body columns distinguishable |
| 1475 | // between "scrubbed" (NULL) and "empty body" once scrubbing is wired up. |
| 1476 | func nullIfEmptyString(s string) interface{} { |
| 1477 | if s == "" { |
| 1478 | return nil |
| 1479 | } |
| 1480 | return s |
| 1481 | } |
| 1482 | |
| 1483 | // --- HITL approval store helpers --- |
| 1484 |
no outgoing calls
no test coverage detected