基础数据类型处理支持数据指针
This commit is contained in:
		
							
								
								
									
										10
									
								
								run.go
									
									
									
									
									
								
							
							
						
						
									
										10
									
								
								run.go
									
									
									
									
									
								
							| @ -241,15 +241,15 @@ func handleData(inputVal any, rule *define.FieldRule) (any, error) { | ||||
| 	switch rule.Type { | ||||
| 	case consts.DataTypeAny: // 任意类型 | ||||
| 		return inputVal, nil | ||||
| 	case consts.DataTypeFloat: // float数据 | ||||
| 	case consts.DataTypeFloat, consts.DataTypeFloatPtr: // float数据 | ||||
| 		return handleFloat(inputVal, rule) | ||||
| 	case consts.DataTypeInt: // int类型 | ||||
| 	case consts.DataTypeInt, consts.DataTypeIntPtr: // int类型 | ||||
| 		return handleInt(inputVal, rule) | ||||
| 	case consts.DataTypeUint: | ||||
| 	case consts.DataTypeUint, consts.DataTypeUintPtr: | ||||
| 		return handleUint(inputVal, rule) | ||||
| 	case consts.DataTypeString: // 字符串处理 | ||||
| 	case consts.DataTypeString, consts.DataTypeStringPtr: // 字符串处理 | ||||
| 		return handleString(inputVal, rule) | ||||
| 	case consts.DataTypeBool: | ||||
| 	case consts.DataTypeBool, consts.DataTypeBoolPtr: | ||||
| 		return handleBool(inputVal, rule) | ||||
| 	case consts.DataTypeMapStrFloat, consts.DataTypeMapStrFloatWithMarshal, | ||||
| 		consts.DataTypeMapStrBool, consts.DataTypeMapStrBoolWithMarshal, | ||||
|  | ||||
		Reference in New Issue
	
	Block a user