matchCaseInsensitive returns databases whose short name matches case-insensitively.
(databases []databaseEntry, name string)
| 267 | |
| 268 | // matchCaseInsensitive returns databases whose short name matches case-insensitively. |
| 269 | func matchCaseInsensitive(databases []databaseEntry, name string) []databaseEntry { |
| 270 | var result []databaseEntry |
| 271 | lower := strings.ToLower(name) |
| 272 | for _, db := range databases { |
| 273 | if strings.ToLower(extractDatabaseName(db.Name)) == lower { |
| 274 | result = append(result, db) |
| 275 | } |
| 276 | } |
| 277 | return result |
| 278 | } |
| 279 | |
| 280 | // matchSubstring returns databases whose short name contains the input as a substring. |
| 281 | func matchSubstring(databases []databaseEntry, name string) []databaseEntry { |
no test coverage detected