🔮 Tiny and blazing-fast fuzzy search in Go
This repository has been archived on 2024-06-28. You can view files and clone it, but you cannot make any changes to its state, such as pushing and creating new issues, pull requests or comments.
Find a file
陈劭珑 a26d9b0a4f
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
ci: add woodpecker.yml
2022-12-04 11:35:17 +08:00
.gitignore first commit 2022-12-03 16:08:49 +08:00
.golangci.yml first commit 2022-12-03 16:08:49 +08:00
.woodpecker.yml ci: add woodpecker.yml 2022-12-04 11:35:17 +08:00
fuzzysearch.go first commit 2022-12-03 16:08:49 +08:00
fuzzysearch_example_test.go first commit 2022-12-03 16:08:49 +08:00
fuzzysearch_test.go first commit 2022-12-03 16:08:49 +08:00
go.mod first commit 2022-12-03 16:08:49 +08:00
justfile first commit 2022-12-03 16:08:49 +08:00
LICENSE first commit 2022-12-03 16:08:49 +08:00
README.md first commit 2022-12-03 16:08:49 +08:00

Fuzzy Search

Tiny and blazing-fast fuzzy search in Go

Installation

go get codeberg.org/chensl/fuzzysearch

Examples

package main

import (
	"fmt"

	"codeberg.org/chensl/fuzzysearch"
)

func main() {
	elems := []string{"cartwheel", "foobar", "wheel", "baz"}
	pattern := "whl"

	fmt.Println(fuzzysearch.Find(elems, pattern))
	// Output: [wheel cartwheel]
}

Inspired by