reflex

package
v1.0.5 Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CanConvert

func CanConvert[T any](v any) bool

CanConvert checks if v can be converted to T

func Compare

func Compare[T constraints.Ordered](t1, t2 T) int

func CompareAny

func CompareAny(v1, v2 any) int

Compare compares to any-values and returns: strings.Compare of type-kind-names, if types of v1 and v2 are not equal 0: if values are equal; -1: if v1 < v2; 1: if v1 > v2

func Convert

func Convert[T any](v any) T

Convert converts v to to T. Convert Panics if convert fails

func Filter

func Filter[T any](ts []T, fs []srv.Filter) []T

func Query

func Query[T any](ts []T, meta srv.Meta) []T

func Sort

func Sort[T any](ts []T, scs srv.SortComponents)

func TypeOf

func TypeOf[T any]() reflect.Type

func ZeroOf

func ZeroOf[T any]() T

Types

This section is empty.

Jump to

Keyboard shortcuts

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