keywordSuggestion tries to find a valid JSON keyword that is close to the given string and returns it if found. If no keyword is close enough, returns the empty string.
(given string)
| 13 | // given string and returns it if found. If no keyword is close enough, returns |
| 14 | // the empty string. |
| 15 | func keywordSuggestion(given string) string { |
| 16 | return nameSuggestion(given, keywords) |
| 17 | } |
| 18 | |
| 19 | // nameSuggestion tries to find a name from the given slice of suggested names |
| 20 | // that is close to the given name and returns it if found. If no suggestion |