A Fuzzy-Finder CLI in Go — Two-Row Edit Distance, Unicode Correctness, and Mutex-Free Concurrency by Index

go dev.to

lev kitten sitting mitten prints each candidate's Levenshtein edit distance and similarity, ranked — a tiny fuzzy finder, written in Go. Three implementation hinges: (1) fold the DP table to two rows for O(min(m,n)) memory, (2) operate on runes, not bytes, so "café"↔"cafe" is 1 and CJK/emoji are counted correctly, and (3) make the goroutine fan-out race-free without a mutex by partitioning the result slice by index. This is SEN's first Go entry (the previous one was Rust — two non-JS in a row).

Read Full Tutorial open_in_new
arrow_back Back to Tutorials