MCPcopy Create free account
hub / github.com/apache/fory / unwrap

Method unwrap

go/fory/optional_serializer.go:136–144  ·  view source on GitHub ↗
(value reflect.Value)

Source from the content-addressed store, hash-verified

134}
135
136func (s *optionalSerializer) unwrap(value reflect.Value) reflect.Value {
137 if value.Kind() == reflect.Ptr {
138 if value.IsNil() {
139 return reflect.Value{}
140 }
141 return value.Elem()
142 }
143 return value
144}
145
146func (s *optionalSerializer) has(value reflect.Value) bool {
147 value = s.unwrap(value)

Callers 3

hasMethod · 0.95
valueFieldMethod · 0.95
setHasMethod · 0.95

Calls 1

KindMethod · 0.80

Tested by

no test coverage detected