utils

package
v0.0.0-...-b33ce83 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetFileLine

func GetFileLine() string

func IntMax

func IntMax(i, max int) int

func IntMin

func IntMin(i, min int) int

func IntMinMax

func IntMinMax(i, min, max int) int

func IntMinMaxDefault

func IntMinMaxDefault(i, min, max, _default int) int

func MakeArrayUnique

func MakeArrayUnique[T comparable](array *[]T) (res []T)

func MakeArrayUniqueInterface

func MakeArrayUniqueInterface[T comparable](array *[]T) (res []interface{})

func MakeStringArrayUniqueAndCheckLength

func MakeStringArrayUniqueAndCheckLength(array *[]string, limit int) (res []string)

func Multiply

func Multiply[T int | int32](a, b T) T

func NotInMapFindAllAppendDefault

func NotInMapFindAllAppendDefault[T any](m map[string][]T, keys []string) (val []T)

func NotInMapFindAllDefault

func NotInMapFindAllDefault[T any](m map[string]T, keys []string) (val []T)

func NotInMapFindDefault

func NotInMapFindDefault[T string | []int](m map[string]T, key string) (val T)

func SplitTrim

func SplitTrim(s, sep string) (res []string)

func SplitTrimLower

func SplitTrimLower(s, sep string) (res []string)

func SplitTrimLowerUniqueLen

func SplitTrimLowerUniqueLen(s, sep string) int

func SplitTrimUpper

func SplitTrimUpper(s, sep string) (res []string)

func StringRepeatArray

func StringRepeatArray(s string, count int) (arr []string)

func StringRepeatJoin

func StringRepeatJoin(str, sep string, count int) string

func TernaryOperator

func TernaryOperator[V any](tf bool, T, F V) V

func ToInt

func ToInt(i any) (ii int)

func ToJsonIndentString

func ToJsonIndentString(i any) (str *[]byte)

func ToJsonString

func ToJsonString(i any) (str *[]byte)

func TrimLower

func TrimLower(s string) string

func TrimUpper

func TrimUpper(s string) string

Types

This section is empty.

Jump to

Keyboard shortcuts

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