fuzzy

package
v0.37.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 20, 2026 License: MIT Imports: 0 Imported by: 0

Documentation

Overview

Package fuzzy holds small string-similarity helpers shared across the codebase. It is dependency-free and low-level so both the framework and the CLI (which cannot import each other) can reuse one implementation instead of maintaining copies.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Levenshtein

func Levenshtein(a, b string) int

Levenshtein returns the edit distance between a and b — the minimum number of single-character insertions, deletions, or substitutions to turn one into the other. Inputs are compared bytewise; for ASCII identifiers (command names, field names) that is equivalent to rune distance.

It uses two rolling rows, so allocation and memory are O(len(b)); the identifier lists it runs against are tiny.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL