Documentation
¶
Index ¶
- Constants
- Variables
- func Any[T any](s []T, f func(T) bool) bool
- func Concurrently(fns ...func() any) []any
- func ErrGroup[T any](limit int) *errGroup[T]
- func Filter[T any](s []T, f func(T) bool) []T
- func Flat[T any](s [][]T) []T
- func HashString(s string) string
- func Map[T, U any](s []T, f func(T) U) []U
- func Mapper[Key comparable, T any](s []T, f func(T) Key) map[Key]T
- func Ptr[T any](t T) *T
- func ReadZipFile(zf *zip.File) ([]byte, error)
- func Reduce[T, U any](s []T, f func(U, T) U, init U) U
- func SafeDereference(s *string) string
- func SemverFix(version string) (string, error)
- func Some[T any](s []T, f func(T) bool) bool
- func ZipReaderFromResponse(resp *http.Response) (*zip.Reader, error)
- type CompareResult
- type Date
Constants ¶
View Source
const ISO8601Format = "2006-01-02T15:04:05.000"
Variables ¶
View Source
var (
ErrInvalidVersion = fmt.Errorf("invalid version")
)
Functions ¶
func Concurrently ¶
func HashString ¶
func Mapper ¶
func Mapper[Key comparable, T any](s []T, f func(T) Key) map[Key]T
func SafeDereference ¶
Types ¶
type CompareResult ¶
type CompareResult[T any] struct { OnlyInA []T OnlyInB []T InBoth []T }
func CompareSlices ¶
func CompareSlices[T any, K comparable](a, b []T, serializer func(T) K) CompareResult[T]
Click to show internal directories.
Click to hide internal directories.