MCPcopy Index your code
hub / github.com/coder/coder / isNilInterfaceValue

Function isNilInterfaceValue

coderd/x/chatd/chatdebug/model.go:975–987  ·  view source on GitHub ↗

isNilInterfaceValue reports whether v is nil or holds a nil pointer, map, slice, channel, or func.

(v any)

Source from the content-addressed store, hash-verified

973// isNilInterfaceValue reports whether v is nil or holds a nil pointer,
974// map, slice, channel, or func.
975func 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

Callers 3

normalizeMessagePartsFunction · 0.85
normalizeToolsFunction · 0.85
normalizeContentPartsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected