def

package
v1.0.4 Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2023 License: MIT Imports: 1 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Condition

func Condition[X any](condition bool, yes X, no X) X

func ConditionFunc

func ConditionFunc[X any](condition bool, yes func() X, no func() X) X

func MakeChan

func MakeChan[E any](c chan E, size int) chan E

func MakeChanP

func MakeChanP[E any](cp *chan E, size int)

func MakeMap

func MakeMap[K comparable, V any](m map[K]V) map[K]V

func MakeMapP

func MakeMapP[K comparable, V any](mp *map[K]V)

func MakeSizeMap

func MakeSizeMap[K comparable, V any](m map[K]V, size int) map[K]V

func MakeSizeMapP

func MakeSizeMapP[K comparable, V any](mp *map[K]V, size int)

func MakeSlice

func MakeSlice[E any](s []E, size int) []E

func MakeSliceP

func MakeSliceP[E any](sp *[]E, size int)

func SetAny

func SetAny[O any](o O, def O) O

func SetAnyP

func SetAnyP[O any](op *O, def O)

func SetChan

func SetChan[E any](c chan E, def chan E) chan E

func SetChanP

func SetChanP[E any](cp *chan E, def chan E)

func SetDefault

func SetDefault[X comparable](v X, def X) X

func SetDefaultEqual

func SetDefaultEqual[X comparable](v X, def X, ref X) X

func SetDefaultIf

func SetDefaultIf[X any](v X, def X, condition func(v X) bool) X

func SetDefaultP

func SetDefaultP[X comparable](vp *X, def X)

func SetDefaultPEqual

func SetDefaultPEqual[X comparable](vp *X, def X, ref X)

func SetDefaultPIf

func SetDefaultPIf[X any](vp *X, def X, condition func(v X) bool)

func SetDefaults

func SetDefaults[X comparable](v X, defs ...X) X

func SetDefaultsP

func SetDefaultsP[X comparable](vp *X, defs ...X)

func SetMap

func SetMap[K comparable, V any](m map[K]V, def map[K]V) map[K]V

func SetMapP

func SetMapP[K comparable, V any](mp *map[K]V, def map[K]V)

func SetSlice

func SetSlice[E any](s []E, def []E) []E

func SetSliceP

func SetSliceP[E any](sp *[]E, def []E)

func SetterAny

func SetterAny[O any](o O, setter func() O) O

func SetterAnyP

func SetterAnyP[O any](op *O, setter func() O)

func SetterChan

func SetterChan[E any](c chan E, setter func() chan E) chan E

func SetterChanP

func SetterChanP[E any](cp *chan E, setter func() chan E)

func SetterDefault

func SetterDefault[X comparable](v X, setter func() X) X

func SetterDefaultEqual

func SetterDefaultEqual[X comparable](v X, setter func() X, ref X) X

func SetterDefaultIf

func SetterDefaultIf[X any](v X, setter func() X, condition func(v X) bool) X

func SetterDefaultP

func SetterDefaultP[X comparable](vp *X, setter func() X)

func SetterDefaultPIf

func SetterDefaultPIf[X any](vp *X, setter func() X, condition func(v X) bool)

func SetterDefaultPIfEqual

func SetterDefaultPIfEqual[X comparable](vp *X, setter func() X, ref X)

func SetterMap

func SetterMap[K comparable, V any](m map[K]V, setter func() map[K]V) map[K]V

func SetterMapP

func SetterMapP[K comparable, V any](mp *map[K]V, setter func() map[K]V)

func SetterSlice

func SetterSlice[E any](s []E, setter func() []E) []E

func SetterSliceP

func SetterSliceP[E any](sp *[]E, setter func() []E)

Types

This section is empty.

Jump to

Keyboard shortcuts

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