NullIfEmpty returns a *string pointing to s, or nil if s is empty.
(s string)
| 216 | |
| 217 | // NullIfEmpty returns a *string pointing to s, or nil if s is empty. |
| 218 | func NullIfEmpty(s string) any { |
| 219 | if s == "" { |
| 220 | return nil |
| 221 | } |
| 222 | return s |
| 223 | } |
| 224 | |
| 225 | // OpenDB opens (or creates) the SQLite database at path, ensures the |
| 226 | // schema is present, and runs idempotent migrations. |