getStringField returns the string value for a field, or empty string if not found
(fieldMap map[string]string, field string)
| 241 | |
| 242 | // getStringField returns the string value for a field, or empty string if not found |
| 243 | func getStringField(fieldMap map[string]string, field string) string { |
| 244 | value, ok := fieldMap[field] |
| 245 | if !ok { |
| 246 | return "" |
| 247 | } |
| 248 | return value |
| 249 | } |
| 250 | |
| 251 | // parseFloat extracts a float64 from the field map, returning 0 if missing or invalid |
| 252 | func parseFloat(fieldMap map[string]string, field string) float64 { |
no outgoing calls
no test coverage detected