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