utils

package
v0.9.17 Latest Latest
Warning

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

Go to latest
Published: Jul 13, 2022 License: MIT Imports: 11 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeleteSpaces

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

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

func IsRunningInContainer

func IsRunningInContainer() bool

func IsRunningInDocker

func IsRunningInDocker() bool

func IsRunningInK8s

func IsRunningInK8s() bool

func IsStringInFile

func IsStringInFile(s, path string) bool

func IsStringInSlice

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

func NewReadCloser

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

func RemoveScheme

func RemoveScheme(s string) string

Types

type NopStringWriteCloser

type NopStringWriteCloser struct {
	strings.Builder
}

func (NopStringWriteCloser) Close

func (NopStringWriteCloser) Close() error

Jump to

Keyboard shortcuts

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