utils

package
v0.0.0-...-66bbac4 Latest Latest
Warning

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

Go to latest
Published: Sep 21, 2023 License: GPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExtractJSON

func ExtractJSON(s string) string

func GetFunctionName

func GetFunctionName(i interface{}) string

func HandlePanic

func HandlePanic(r interface{}) error

func PickRandomString

func PickRandomString(strs ...string) string

func RoundFloat

func RoundFloat(val float64, precision uint) float64

func StringInSlice

func StringInSlice(a string, list []string) bool

func StringToChunks

func StringToChunks(s string, chunkSize int) []string

StringToChunks splits a string into chunks of a given size Not very efficient, and very ugly, but it works

func SubtractInt

func SubtractInt(ints ...int) int

func SubtractIntWithMinimum

func SubtractIntWithMinimum(min int, ints ...int) int

func Testing

func Testing() bool

func TickerOrDefault

func TickerOrDefault(d time.Duration, def time.Duration) *time.Ticker

func Truncate

func Truncate(s string, n int) string

Types

This section is empty.

Jump to

Keyboard shortcuts

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