utils

package
v1.3.23 Latest Latest
Warning

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

Go to latest
Published: Mar 2, 2026 License: MPL-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AppVersion added in v1.2.34

func AppVersion() string

func Append added in v1.2.35

func Append(res []string, values ...string) []string

func AppendMap added in v1.1.6

func AppendMap[K comparable, V any](values map[K]V, to *map[K]V)

func AppendMapWithResolving added in v1.1.6

func AppendMapWithResolving[K comparable, V any](values map[K]V, to *map[K]V, resolver func(key K, value1, value2 V) V)

func CNameToCamelName added in v1.2.34

func CNameToCamelName(s string) string

TODO - investigate if this function is good

func CopyMap added in v1.1.6

func CopyMap[K comparable, V any](m map[K]V) map[K]V

func DoLint added in v1.2.35

func DoLint(commentRight string) bool

func ExtractTLGenTag added in v1.2.35

func ExtractTLGenTag(comment string, tag string) (found bool, value string)

finds value for tags in comment with template {tag}:"{value}"

func FilterSlice added in v1.1.6

func FilterSlice[A any](in []A, f func(A) bool) (out []A)

func IsFirstBasicLatin added in v1.2.35

func IsFirstBasicLatin(str string) bool

func JsonPrettyPrint

func JsonPrettyPrint(in []byte) []byte

func Keys added in v1.1.6

func Keys[K comparable, V any](m map[K]V) (res []K)

unstable

func MapSlice added in v1.1.6

func MapSlice[A, B any](in []A, f func(A) B) (out []B)

func ParseHexToBytes added in v1.1.8

func ParseHexToBytes(data string) []byte

func ParseHexToBytesTL2 added in v1.1.25

func ParseHexToBytesTL2(data string) []byte

func PutPairToSetOfPairs added in v1.1.6

func PutPairToSetOfPairs[K, V comparable](in *map[K]map[V]bool, k K, v V)

func ReverseSetOfPairs added in v1.1.6

func ReverseSetOfPairs[K, V comparable](in map[K]map[V]bool) map[V]map[K]bool

func SetIntersection added in v1.2.17

func SetIntersection[K comparable](s1, s2 map[K]bool) map[K]bool

func SetSubSets added in v1.2.10

func SetSubSets[T comparable](s map[T]bool) (values []map[T]bool)

WARINING: USE IF S IS SMALL AND IF YOU NOT FACE ALLOCATION PROBLEM

func SetToSlice added in v1.1.6

func SetToSlice[T comparable](s map[T]bool) []T

unstable

func SetUnion added in v1.2.17

func SetUnion[K comparable](s1, s2 map[K]bool) map[K]bool

func ShiftAll added in v1.2.35

func ShiftAll(s []string, shift string) []string

func SliceToMap added in v1.2.17

func SliceToMap[K comparable, T, V any](s []T, key func(T) K, value func(T) V) map[K]V

func SliceToSet added in v1.1.6

func SliceToSet[T comparable](s []T) map[T]bool

func SprintHexDump added in v1.1.8

func SprintHexDump(data []byte) string

func SprintHexDumpTL2 added in v1.1.25

func SprintHexDumpTL2(data []byte) string

func ToLowerFirst added in v1.2.34

func ToLowerFirst(str string) string

func ToUpperFirst added in v1.2.34

func ToUpperFirst(str string) string

func Values added in v1.2.10

func Values[K comparable, V any](m map[K]V) (res []V)

unstable

func WalkDeterministic

func WalkDeterministic(fileExt string, root ...string) ([]string, error)

WalkDeterministic recursively walks through roots directories and returns all regular files with extension fileExt

Types

This section is empty.

Jump to

Keyboard shortcuts

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