CheckExistsField check field is exists by name
(elem reflect.Value, fieldName string)
| 358 | |
| 359 | // CheckExistsField check field is exists by name |
| 360 | func (dm *mapperObject) CheckExistsField(elem reflect.Value, fieldName string) (realFieldName string, exists bool) { |
| 361 | typeName := elem.Type().String() |
| 362 | fileKey := typeName + nameConnector + fieldName |
| 363 | realName, isOk := dm.fieldNameMap.Load(fileKey) |
| 364 | |
| 365 | if !isOk { |
| 366 | return "", isOk |
| 367 | } else { |
| 368 | return realName.(string), isOk |
| 369 | } |
| 370 | } |
| 371 | |
| 372 | // CheckIsTypeWrapper check value is in type wrappers |
| 373 | func (dm *mapperObject) CheckIsTypeWrapper(value reflect.Value) bool { |
no test coverage detected