Documentation
¶
Index ¶
- func AreWeInContainer() bool
- func Assert(condition bool, errorMessage string) error
- func Btoi(b bool) int
- func ByteCountIEC(b int64) string
- func CheckErr(err error, args ...string)
- func DieOnError(err error, args ...string)
- func DoHttpFetch(req *http.Request) ([]byte, error)
- func DoHttpRequest(req *http.Request) []byte
- func DoesDirectoryExist(path string) bool
- func DoesFileExist(file string) bool
- func FirstNonEmptyS(values ...string) string
- func FirstNonZero(x ...int) int
- func FullHost(r *http.Request) string
- func Hash(algo string, bys []byte) string
- func HashStream(algo string, rc io.Reader) string
- func IsPortAvailable(port int) bool
- func Log(message ...interface{})
- func LogError(message ...interface{})
- func LogWarn(message ...interface{})
- func PrintTable(data [][]string, dividers bool)
- func RandomString(n int) string
- func ReadFile(path string) []byte
- func ReadFileLines(path string, send func(string))
- func ReduceNumber(input int64, unit int64, base string, prefixes string) string
- func RunOnClose(f func())
- func TrimLen(s string, l int) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AreWeInContainer ¶
func AreWeInContainer() bool
AreWeInContainer returns true if this process is running inside docker
func ByteCountIEC ¶
func DieOnError ¶
func DoHttpRequest ¶
func DoesDirectoryExist ¶
func DoesFileExist ¶
func FirstNonEmptyS ¶
func FirstNonZero ¶
func IsPortAvailable ¶
func PrintTable ¶
func RandomString ¶
RandomString returns a random alphanumeric string of length n
func ReadFileLines ¶
func RunOnClose ¶
func RunOnClose(f func())
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.