Versions in this module Expand all Collapse all v0 v0.0.4 Nov 26, 2026 Changes in this version + func CountLines(s string) int + func DefaultEditThreshold(query, target string) int + func FormatDidYouMean(suggestions []string) string + func Levenshtein(a, b string) int + func RankBy[T any](items []T, limit int, key func(T) string, ...) (ranked []T, total int) + func RankMatch(query, target string, maxDist int) (tier, score int, ok bool) + func SuggestClosestStrings(query string, targets []string, limit int) []string + func TopClosestIDs(matches []ClosestMatch, limit int) []string + func TruncateBytes(s string, maxBytes int) (string, bool) + func TruncateHead(s string, maxLines, maxBytes int) (string, bool) + func TruncateLine(s string, maxBytes int, suffix string) (string, bool) + type BestRank struct + func (b *BestRank) Consider(tier, score int, ok bool) + func (b BestRank) Result() (tier, score int, ok bool) + type ClosestMatch struct + ID string + Score int + Tier int