Documentation ¶
Index ¶
- func All[T any](s []T, f func(T) bool) bool
- func Any[T any](s []T, f func(T) bool) bool
- func Contains[T comparable](s []T, v T) bool
- func ExpandHome(path *string)
- func FindFirst[T any](s []T, f func(T) bool) *T
- func Join(arr []string, joiner string) string
- func Keys[K comparable, V any](m map[K]V) []K
- func Map[TIn any, TOut any](s []TIn, f func(TIn) TOut) []TOut
- func Max(arr []int) int
- func Pad(s string, maxLen int) string
- func Transpose[T any](slice [][]T) [][]T
- func Values[K comparable, V any](m map[K]V) []V
- func Where[T any](s []T, f func(T) bool) []T
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Contains ¶
func Contains[T comparable](s []T, v T) bool
Contains returns whether the given slice contains the given element
func ExpandHome ¶
func ExpandHome(path *string)
func FindFirst ¶
FindFirst return a reference to the first element of the slice that matches the predicate. It returns nil if the slice is nil or empty or if no item matches the predicate.
func Keys ¶
func Keys[K comparable, V any](m map[K]V) []K
func Transpose ¶
func Transpose[T any](slice [][]T) [][]T
Transpose returns the matrix transposed from (nxm) to (mxn)
func Values ¶
func Values[K comparable, V any](m map[K]V) []V
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.