package
2.0.0-alpha+incompatible
Repository: https://github.com/leighmacdonald/mika.git
Documentation: pkg.go.dev
# Functions
EstSpeed will estimate a peers speed using downloaded amount over time.
Exists checks for the existence of a file path.
FindFile will walk up the directory tree until it find a file.
GenRandomBytes returns N bytes of random data.
HumanBytesString produces a human readable representation of an SI size.
HumanIBytesString produces a human readable representation of an IEC size.
IsPrivateIP returns true if the IP provided is a valid routable address.
MinInt returns the smallest of two int values.
NewPasskey generated a string suitable for use as a passkey.
StringToBool converts a string to a bool returning a default value on failure.
StringToFloat64 converts a string to a float64 returning a default value on failure.
StringToInt16 converts a string to a int16 returning a default value on failurenoinspection GoUnusedExportedFunction.
StringToTime converts a string to a time.Time returning a default value on failure.
StringToUInt converts a string to a uint32 returning a default value on failure.
StringToUInt16 converts a string to a uint16 returning a default value on failure.
StringToUInt32 converts a string to a uint32 returning a default value on failure.
StringToUInt64 converts a string to a uint32 returning a default value on failure.
TimeToString converts a time.Time to a common RFC1123Z string.
UMax is math.Max for uint.
UMax16 is math.Max for uint16.
UMax32 is math.Max for uint64.
UMax64 is math.Max for uint64.
UMin64 is math.Min for uint64.
WaitForSignal will execute a function when a matching os.Signal is received This is mostly designed to shutdown & cleanup services.