- 改UpdtePlace的调用参数
This commit is contained in:
@@ -20,6 +20,10 @@ func CheckAndGetStructValue(item interface{}) *reflect.Value {
|
||||
return &value
|
||||
}
|
||||
|
||||
func IsFieldExist(obj interface{}, fieldName string) bool {
|
||||
return reflect.Indirect(reflect.ValueOf(obj)).FieldByName(fieldName).IsValid()
|
||||
}
|
||||
|
||||
func GetObjFieldByName(obj interface{}, fieldName string) interface{} {
|
||||
return reflect.Indirect(reflect.ValueOf(obj)).FieldByName(fieldName).Interface()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user