utils

package
v0.9.8 Latest Latest
Warning

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

Go to latest
Published: Jun 23, 2022 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeleteSpaces added in v0.9.5

func DeleteSpaces(str string) string

// https://stackoverflow.com/questions/7052693/how-to-get-the-name-of-a-function-in-go

func GetFunctionName(temp interface{}) string {
	strs := strings.Split((runtime.FuncForPC(reflect.ValueOf(temp).Pointer()).Name()), ".")
	return strs[len(strs)-1]
}

https://stackoverflow.com/questions/32081808/strip-all-whitespace-from-a-string

func FuzzySearch added in v0.9.6

func FuzzySearch(str string, strList []string, threshold float32) (string, error)

func NewReadCloser added in v0.9.5

func NewReadCloser(r io.Reader, closure func() error) io.ReadCloser

func StringInSlice

func StringInSlice(a string, list []string) bool

Types

type NopStringWriteCloser added in v0.9.6

type NopStringWriteCloser struct {
	strings.Builder
}

func (NopStringWriteCloser) Close added in v0.9.6

func (NopStringWriteCloser) Close() error

Jump to

Keyboard shortcuts

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