utils

package
v0.0.0-...-d7fb6e2 Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2022 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BytesToHuman

func BytesToHuman(val float64, precision uint, precisionStart string) (string, string)

func GetFileName

func GetFileName(filename string) string

func GetProcessByName

func GetProcessByName(name string) (ps.Process, error)

func HasPrefixMulti

func HasPrefixMulti(s string, prefixes ...string) bool

func ReadFileString

func ReadFileString(path string) (string, error)

func StartCommand

func StartCommand(name string, arg ...string) (*bufio.Reader, error)

func StringSliceContains

func StringSliceContains(slice []string, s string) bool

func StripToEnd

func StripToEnd(s string, sep string) string

func StripWSLPath

func StripWSLPath()

StripWSLPath removes all windows paths from the PATH on WSL as it includes many networked windows directories which are very slow to access

func ToHumanTime

func ToHumanTime(seconds uint64) string

Types

This section is empty.

Jump to

Keyboard shortcuts

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