Documentation
ΒΆ
Index ΒΆ
- func CheckErrors(errChecks ...ErrorFunc) error
- func FloatToString(val float64) string
- func FormatDuration(duration time.Duration) string
- func GetValuePrecision(val float64) int
- func IntArrContains(a []int64, x int64) bool
- func IntArrFind(a []int64, x int64) int
- func ReadFile(filepath string) ([]byte, error)
- func ReadFileToString(filepath string) (string, error)
- func RunInBackground()
- func SaveStringToFile(filepath string, content string) error
- func SaveStructToJSONFile(i interface{}, filepath string) error
- func Ternary(statement bool, a, b interface{}) interface{}
- type ErrorFunc
Constants ΒΆ
This section is empty.
Variables ΒΆ
This section is empty.
Functions ΒΆ
func CheckErrors ΒΆ added in v1.0.1
CheckErrors - check some errors
func FloatToString ΒΆ added in v1.0.3
FloatToString - convert float to string
func FormatDuration ΒΆ added in v1.0.4
FormatDuration - format duration 52h -> "2 days 4 hours"
func GetValuePrecision ΒΆ
GetValuePrecision - find out the precision of the numeric value
func IntArrContains ΒΆ
IntArrContains indicates whether x is contained in a.
func IntArrFind ΒΆ
IntArrFind find element index in arr. -1 if not found
func ReadFileToString ΒΆ
ReadFileToString read file to string
func SaveStringToFile ΒΆ
SaveStringToFile save arbitrary string to file
func SaveStructToJSONFile ΒΆ
SaveStructToJSONFile save arbitrary structure to JSON file
Types ΒΆ
Click to show internal directories.
Click to hide internal directories.