parseBool extracts a boolean from the field map, returning false if missing or invalid
(fieldMap map[string]string, field string)
| 263 | |
| 264 | // parseBool extracts a boolean from the field map, returning false if missing or invalid |
| 265 | func parseBool(fieldMap map[string]string, field string) bool { |
| 266 | value, ok := fieldMap[field] |
| 267 | if !ok { |
| 268 | return false |
| 269 | } |
| 270 | trimmed := strings.TrimSpace(strings.ToLower(value)) |
| 271 | return trimmed == "true" || trimmed == "1" || trimmed == "yes" |
| 272 | } |
| 273 | |
| 274 | // UserDisplayNameResolver interface for resolving user display names |
| 275 | type UserDisplayNameResolver interface { |
no outgoing calls