NilOrEmpty returns true if s is nil or the empty string.
(s *string)
| 14 | |
| 15 | // NilOrEmpty returns true if s is nil or the empty string. |
| 16 | func NilOrEmpty(s *string) bool { |
| 17 | return s == nil || *s == "" |
| 18 | } |
| 19 | |
| 20 | // NilToEmpty coalesces a nil value to the empty value. |
| 21 | func NilToEmpty[T any](s *T) T { |
no outgoing calls