Documentation
¶
Index ¶
- func Contains[T comparable](list []T, v T) bool
- func Default[T any](values []T, def T) (t T)
- func Identities[T Identifier](v ...T) []int64
- func Iterate[T any](list []T, f func(v T))
- func IterateX[A, B any](list []A, f func(v A) B) []B
- func NumbersTo[A, B Number](from []A) []B
- func ParseFloat[T Float](s string) T
- func ParseInteger[T Integer](s string) T
- func ParseUInteger[T UInteger](s string) T
- func StringIdentities[T StringIdentifier](v ...T) []string
- func Strings[T fmt.Stringer](list []T) []string
- func Then[T any](then bool, a, b T) T
- func ThenAny[T any](then, a, b any) T
- func ThenFunc[T any](then bool, a, b func() T) T
- func ThenSet[T any](then bool, set func() T) T
- func ThenSetAny[T any](then bool, set any) T
- type Float
- type Identifier
- type Integer
- type Number
- type StringIdentifier
- type UInteger
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Contains ¶
func Contains[T comparable](list []T, v T) bool
func Identities ¶
func Identities[T Identifier](v ...T) []int64
func ParseFloat ¶
func ParseInteger ¶
func ParseUInteger ¶
func StringIdentities ¶
func StringIdentities[T StringIdentifier](v ...T) []string
func ThenSetAny ¶
Types ¶
type Identifier ¶
type Identifier interface { // IdentityIc40tk get the id, 'Ic40tk' is used to avoid name conflict IdentityIc40tk() int64 }
type StringIdentifier ¶
type StringIdentifier interface { // IdentityLMhIA1 get the id, 'LMhIA1' is used to avoid name conflict IdentityLMhIA1() string }
Click to show internal directories.
Click to hide internal directories.