Documentation
¶
Overview ¶
Package suggest ranks the names a user probably meant when the one they typed matches nothing: request ids, environment names and the like.
Index ¶
Constants ¶
const Max = 3
Max is how many names Closest returns at most: enough to show the likely intended one, few enough to read in an error line.
Variables ¶
This section is empty.
Functions ¶
func Closest ¶
Closest returns up to Max of candidates that are close to query, best first: a candidate query is a prefix of, then one query occurs in, then one within a few edits of it (one edit for a short query, three for a long one). Case, and the difference between - and _, do not count. It returns nil when nothing is close enough, or the query is a single letter: a wrong name should not get a guess for the sake of it.
Types ¶
This section is empty.