utils

package
v1.3.1 Latest Latest
Warning

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

Go to latest
Published: Sep 21, 2022 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BytesForHumanString added in v1.3.1

func BytesForHumanString(b uint64) string

func ExpandPath added in v0.9.23

func ExpandPath(path string) string

Expands tilde and all environment variables from the given path.

func FuzzySearch

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

func HomeDir added in v0.9.23

func HomeDir() string

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

func SortStringsCaseInsensitive added in v0.9.23

func SortStringsCaseInsensitive(data []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