Documentation
¶
Index ¶
- Variables
- func Capital(s string) string
- func CapitalEach(s string) string
- func CastSlice[T any](s []interface{}) []T
- func CopyMap[K comparable, V any](s map[K]V) map[K]V
- func CopySlice[T any](s []T) []T
- func Float(s string) float64
- func FloorTo(n float64, places int) float64
- func GetOr[V any](m any, key string, or V) V
- func Has[K comparable, V any](m map[K]V, key K) bool
- func HasTrue[K comparable, V any](m map[K]V, key K) bool
- func Int(s string) int
- func Interface(data any) interface{}
- func MapConcat[T comparable, M any](maps ...map[T]M) map[T]M
- func MissingOrFalse[K comparable, V any](m map[K]V, key K) bool
- func ModF(n float64) float64
- func Number[T numberLike](val any) T
- func Or(val *mod.ModValueMulti, or float64) float64
- func OrDefault(n float64, def float64) float64
- func OrF(a float64, b float64) float64
- func OrNil(n *float64, def float64) float64
- func OrS(a string, b string) string
- func Ptr[T any](a T) *T
- func RoundTo(n float64, places int) float64
- func Set(m any, key string, value any)
- func Ternary[T any](cond bool, ifTrue T, ifFalse T) T
- func UnwrapOrF(f *float64, or float64) float64
Constants ¶
This section is empty.
Variables ¶
View Source
var LevelTrace = slog.Level(-8)
Functions ¶
func CapitalEach ¶
func CopyMap ¶
func CopyMap[K comparable, V any](s map[K]V) map[K]V
func Has ¶
func Has[K comparable, V any](m map[K]V, key K) bool
func HasTrue ¶
func HasTrue[K comparable, V any](m map[K]V, key K) bool
func MapConcat ¶
func MapConcat[T comparable, M any](maps ...map[T]M) map[T]M
func MissingOrFalse ¶
func MissingOrFalse[K comparable, V any](m map[K]V, key K) bool
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.