(inter interface{}, v *IntPtrValidation)
| 52 | } |
| 53 | |
| 54 | func IntPtr(inter interface{}, v *IntPtrValidation) (*int, error) { |
| 55 | if inter == nil { |
| 56 | return ValidateIntPtrProvided(nil, v) |
| 57 | } |
| 58 | casted, castOk := cast.InterfaceToInt(inter) |
| 59 | if !castOk { |
| 60 | return nil, ErrorInvalidPrimitiveType(inter, PrimTypeInt) |
| 61 | } |
| 62 | return ValidateIntPtrProvided(&casted, v) |
| 63 | } |
| 64 | |
| 65 | func IntPtrFromInterfaceMap(key string, iMap map[string]interface{}, v *IntPtrValidation) (*int, error) { |
| 66 | inter, ok := ReadInterfaceMapValue(key, iMap) |
no test coverage detected