Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Type ¶
type Type[T any] struct { // contains filtered or unexported fields }
func (Type[T]) ForceValue ¶
func (s Type[T]) ForceValue() T
ForceValue returns the wrapped content if not nil, or it will panic
func (Type[T]) ValueOrDefault ¶
func (s Type[T]) ValueOrDefault(d T) T
ValueOrDefault return d if IsNil
func (Type[T]) ValueOrLazyDefault ¶
func (s Type[T]) ValueOrLazyDefault(f func() T) T
ValueOrLazyDefault return f() if IsNil
Click to show internal directories.
Click to hide internal directories.