fn

package
v2.2.2 Latest Latest
Warning

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

Go to latest
Published: Jul 9, 2022 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Fuzzy

func Fuzzy(needle, haystack string) bool

Fuzzy tests if a given haystack contains a given needle.

If the needle can be found one character at a time in the haystack, even if the haystack has extra characters omitted in the needle, this function returns true.

func FuzzySlice

func FuzzySlice[T comparable](needle, haystack []T) bool

FuzzySlice tests if a given haystack contains a given needle.

If the needle can be found one byte at a time in the haystack, even if the haystack has extra bytes omitted in the needle, this function returns true.

func ReadGob

func ReadGob(r io.Reader, i any) error

ReadGob reads a Go object from io.Reader.

func ReadGobFile

func ReadGobFile(path string, i any) error

ReadGobFile reads a Go object from a file.

func ReadJson

func ReadJson(r io.Reader, i any) error

ReadJson reads a JSON object from io.Reader.

func ReadJsonFile

func ReadJsonFile(path string, i any) error

ReadJsonFile reads a JSON object from a file.

func WriteGob

func WriteGob(w io.Writer, obj any) error

WriteGob writes a Go object to io.Writer.

func WriteGobFile

func WriteGobFile(path string, obj any) error

WriteGobFile writes a Go object to a file.

func WriteJson

func WriteJson(w io.Writer, obj any) error

WriteJson writes a JSON object to io.Writer.

func WriteJsonFile

func WriteJsonFile(path string, obj any) error

WriteJsonFile writes a JSON object to a file.

Types

This section is empty.

Jump to

Keyboard shortcuts

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