Documentation
¶
Overview ¶
Package levenshtein provides edit distance calculation and typo suggestions for commands and flags.
Performance & Allocation Invariant: ASCII string comparisons use a dedicated byte-based algorithm operating directly on string headers without converting to []byte, avoiding string-to-byte conversion allocations. For words <= 32 characters, stack arrays are used to eliminate heap allocations entirely. Do NOT unify distanceBytes and distanceRunes into a generic slice function; converting strings to []byte inside Suggest loops introduces heap allocations on every candidate comparison.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.