(key string, sMap map[string]string, v *Float64Validation)
| 72 | } |
| 73 | |
| 74 | func Float64FromStrMap(key string, sMap map[string]string, v *Float64Validation) (float64, error) { |
| 75 | valStr, ok := sMap[key] |
| 76 | if !ok || valStr == "" { |
| 77 | val, err := ValidateFloat64Missing(v) |
| 78 | if err != nil { |
| 79 | return 0, errors.Wrap(err, key) |
| 80 | } |
| 81 | return val, nil |
| 82 | } |
| 83 | val, err := Float64FromStr(valStr, v) |
| 84 | if err != nil { |
| 85 | return 0, errors.Wrap(err, key) |
| 86 | } |
| 87 | return val, nil |
| 88 | } |
| 89 | |
| 90 | func Float64FromStr(valStr string, v *Float64Validation) (float64, error) { |
| 91 | if valStr == "" { |
nothing calls this directly
no test coverage detected