isNilInterfaceValue reports whether v is nil or holds a nil pointer, map, slice, channel, or func.
(v any)
| 973 | // isNilInterfaceValue reports whether v is nil or holds a nil pointer, |
| 974 | // map, slice, channel, or func. |
| 975 | func isNilInterfaceValue(v any) bool { |
| 976 | if v == nil { |
| 977 | return true |
| 978 | } |
| 979 | |
| 980 | rv := reflect.ValueOf(v) |
| 981 | switch rv.Kind() { |
| 982 | case reflect.Chan, reflect.Func, reflect.Map, reflect.Pointer, reflect.Slice: |
| 983 | return rv.IsNil() |
| 984 | default: |
| 985 | return false |
| 986 | } |
| 987 | } |
| 988 | |
| 989 | // normalizeMessageParts extracts type and bounded metadata from each |
| 990 | // MessagePart. Text-like payloads are bounded to |
no outgoing calls
no test coverage detected