Skip to content

koki-develop/go-fzf

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿ” go-fzf

Go Reference GitHub release (latest by date) GitHub Workflow Status Maintainability Go Report Card LICENSE

Fuzzy Finder CLI and Library.

English | ๆ—ฅๆœฌ่ชž

Contents

Usage

Using as a CLI

If you want to know what you can do with go-fzf, try the gofzf CLI.
The gofzf CLI is built with go-fzf and can utilize most of go-fzf's features.

For more information, please refer to the documentation.

Using as a library

With go-fzf, you can easily create a highly customizable Fuzzy Finder.
For example, you can create a Fuzzy Finder like the one below with just this simple code:

package main

import (
	"fmt"
	"log"

	"github.com/koki-develop/go-fzf"
)

func main() {
	items := []string{"hello", "world", "foo", "bar"}

	f, err := fzf.New()
	if err != nil {
		log.Fatal(err)
	}

	idxs, err := f.Find(items, func(i int) string { return items[i] })
	if err != nil {
		log.Fatal(err)
	}

	for _, i := range idxs {
		fmt.Println(items[i])
	}
}

For more information, please refer to the documentation

Examples

Various examples of how to use go-fzf are available in the examples directory.

LICENSE

MIT