util

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2022 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ArrayCast

func ArrayCast[T any](source []interface{}) []T

func ArrayConvert

func ArrayConvert[T any, Y any](source []Y,
	convert func(item Y) T) []T

func Average

func Average(source []float64) float64

func If

func If[T any](cond bool, vtrue, vfalse T) T

func Max

func Max(source []float64) float64

func SplitSlice

func SplitSlice[T any, Y comparable](source []T,
	identification func(item T) Y) (m map[Y][]T)

This function split a list based on a evaluation function the result is a map of lists

func SplitString

func SplitString(source, delimiter string) []string

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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