MCPcopy Create free account
hub / github.com/cortexlabs/cortex / Int64Ptr

Function Int64Ptr

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

Source from the content-addressed store, hash-verified

52}
53
54func Int64Ptr(inter interface{}, v *Int64PtrValidation) (*int64, error) {
55 if inter == nil {
56 return ValidateInt64PtrProvided(nil, v)
57 }
58 casted, castOk := cast.InterfaceToInt64(inter)
59 if !castOk {
60 return nil, ErrorInvalidPrimitiveType(inter, PrimTypeInt)
61 }
62 return ValidateInt64PtrProvided(&casted, v)
63}
64
65func Int64PtrFromInterfaceMap(key string, iMap map[string]interface{}, v *Int64PtrValidation) (*int64, error) {
66 inter, ok := ReadInterfaceMapValue(key, iMap)

Callers 1

Int64PtrFromInterfaceMapFunction · 0.85

Calls 3

InterfaceToInt64Function · 0.92
ValidateInt64PtrProvidedFunction · 0.85

Tested by

no test coverage detected