...

Package spell

import "go.starlark.net/internal/spell"
Overview
Index

Overview ▾

Package spell file defines a simple spelling checker for use in attribute errors such as "no such field .foo; did you mean .food?".

func Nearest

func Nearest(x string, candidates []string) string

Nearest returns the element of candidates nearest to x using the Levenshtein metric, or "" if none were promising.