MCPcopy Index your code
hub / github.com/cortexlabs/cortex / Float64Ptr

Function Float64Ptr

pkg/lib/configreader/float64_ptr.go:54–63  ·  view source on GitHub ↗
(inter interface{}, v *Float64PtrValidation)

Source from the content-addressed store, hash-verified

52}
53
54func Float64Ptr(inter interface{}, v *Float64PtrValidation) (*float64, error) {
55 if inter == nil {
56 return ValidateFloat64PtrProvided(nil, v)
57 }
58 casted, castOk := cast.InterfaceToFloat64(inter)
59 if !castOk {
60 return nil, ErrorInvalidPrimitiveType(inter, PrimTypeFloat)
61 }
62 return ValidateFloat64PtrProvided(&casted, v)
63}
64
65func Float64PtrFromInterfaceMap(key string, iMap map[string]interface{}, v *Float64PtrValidation) (*float64, error) {
66 inter, ok := ReadInterfaceMapValue(key, iMap)

Callers 1

Calls 3

InterfaceToFloat64Function · 0.92

Tested by

no test coverage detected