(unknownProps []string, scopes []string)
| 415 | } |
| 416 | |
| 417 | func uniqueClosestScopeSuggestions(unknownProps []string, scopes []string) []string { |
| 418 | var allSuggestions []string |
| 419 | for _, prop := range unknownProps { |
| 420 | prop = strings.TrimSpace(prop) |
| 421 | if prop == "" { |
| 422 | continue |
| 423 | } |
| 424 | allSuggestions = append(allSuggestions, FindClosestMatches(prop, scopes, maxClosestMatches)...) |
| 425 | } |
| 426 | seen := make(map[string]struct { |
| 427 | }) |
| 428 | var unique []string |
| 429 | for _, s := range allSuggestions { |
| 430 | if !setutil.Contains(seen, s) { |
| 431 | seen[s] = struct { |
| 432 | }{} |
| 433 | unique = append(unique, s) |
| 434 | } |
| 435 | } |
| 436 | return unique |
| 437 | } |
| 438 | |
| 439 | func appendKnownFieldDocsURL(result, docsURL string) string { |
| 440 | if docsURL == "" { |
no test coverage detected