utils

package
v0.0.19 Latest Latest
Warning

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

Go to latest
Published: Jul 25, 2025 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CsvPretty added in v0.0.19

func CsvPretty(
	header []string,
	rows [][]string,
	sortRows bool,
) string

Fails if the header is shorter than any of the rows

func CsvPrettyMap added in v0.0.19

func CsvPrettyMap(keyName string, valueName string, m map[string]string) string

func Filter added in v0.0.15

func Filter[T any](slice []T, predicate func(x T) bool) []T

func Map2Cmp added in v0.0.19

func Map2Cmp[T any](m1, m2 map[string]map[string]T, cmp func(x1 T, x2 T) bool) bool

func MapCmp added in v0.0.19

func MapCmp[T any](m1, m2 map[string]T, cmp func(x1 T, x2 T) bool) bool

func MapGetOrPutDefault added in v0.0.19

func MapGetOrPutDefault[T any](m map[string]T, key string, getDefault func() T) T

func MaxBigInt added in v0.0.11

func MaxBigInt(a *big.Int, b *big.Int) *big.Int

func MinBigInt

func MinBigInt(a *big.Int, b *big.Int) *big.Int

func NestedMapGetOrPutDefault added in v0.0.19

func NestedMapGetOrPutDefault[T any](m map[string]map[string]T, key1 string, key2 string, getDefault func() T) T

func NonExhaustiveMatchPanic

func NonExhaustiveMatchPanic[T any](value any) T

func NonNeg added in v0.0.17

func NonNeg(a *big.Int) *big.Int

Types

This section is empty.

Jump to

Keyboard shortcuts

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