suggest

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Jan 22, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package suggest provides fuzzy matching and "did you mean" suggestions.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FindSimilar

func FindSimilar(target string, candidates []string, maxResults int) []string

FindSimilar finds similar strings from candidates that are close to target. Returns up to maxResults matches, sorted by similarity (best first).

func FormatSuggestion

func FormatSuggestion(entity, name string, suggestions []string, createHint string) string

FormatSuggestion formats an error message with suggestions.

Types

type Match

type Match struct {
	Value string
	Score int
}

Match represents a potential match with its score.

Jump to

Keyboard shortcuts

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