Documentation ¶
Index ¶
- func IntoTime(o Of[time.Time]) null.Time
- type Of
- func From[T any](v T) Of[T]
- func FromNonZero[T comparable](v T) Of[T]
- func FromNonZeroSlice[T any](s []T) Of[[]T]
- func FromTime(t null.Time) Of[time.Time]
- func Map[T, U any](o Of[T], mapper func(T) U) Of[U]
- func MapErr[T, U any](o Of[T], mapper func(T) (U, error)) (Of[U], error)
- func MapSlice[T, U any](o Of[[]T], mapper func(T) U) Of[[]U]
- func None[T any]() Of[T]
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Of ¶
func FromNonZero ¶ added in v0.4.8
func FromNonZero[T comparable](v T) Of[T]
func FromNonZeroSlice ¶ added in v0.4.8
func (Of[T]) ValueOrZero ¶
func (o Of[T]) ValueOrZero() T
ValueOrZero 値が入っているときはその値を、そうでないときはゼロ値を返します。
Click to show internal directories.
Click to hide internal directories.