Documentation ¶
Index ¶
- func C0(err error)
- func C1[T1 comparable](v1 T1, err error) T1
- func C2[T1, T2 comparable](v1 T1, v2 T2, err error) (T1, T2)
- func Done(err error)
- func Fata(err error)
- func Fine[V comparable](v V)
- func Full[V *any](v any)
- func Good[V comparable](v V)
- func Must(err error)
- func Nice[V comparable](v V) V
- func None[V comparable](v V)
- func Null[V *any](v any)
- func P0(err error)
- func P1[T1 any](v1 *T1, err error) *T1
- func P2[T1, T2 any](v1 *T1, v2 *T2, err error) (*T1, *T2)
- func Safe[V comparable](v V)
- func Soft(err error)
- func Sure[V comparable](v V) V
- func V0(err error)
- func V1[T1 any](v1 T1, err error) T1
- func V2[T1, T2 any](v1 T1, v2 T2, err error) (T1, T2)
- func Zero[V comparable](v V)
- type Vae
- func (a *Vae[V]) Fine()
- func (a *Vae[V]) Good()
- func (a *Vae[V]) Have()
- func (a *Vae[V]) Len(n int)
- func (a *Vae[V]) Length(n int)
- func (a *Vae[V]) Nice() []V
- func (a *Vae[V]) None()
- func (a *Vae[V]) Safe()
- func (a *Vae[V]) Size(n int)
- func (a *Vae[V]) Some() []V
- func (a *Vae[V]) Sure() []V
- func (a *Vae[V]) Void()
- func (a *Vae[V]) Zero()
- type Vbe
- type Vce
- func (a *Vce[V]) Diff(v V)
- func (a *Vce[V]) Different(v V)
- func (a *Vce[V]) Equals(v V)
- func (a *Vce[V]) Fine()
- func (a *Vce[V]) Good()
- func (a *Vce[V]) Is(v V)
- func (a *Vce[V]) Nice() V
- func (a *Vce[V]) None()
- func (a *Vce[V]) Safe()
- func (a *Vce[V]) Same(v V)
- func (a *Vce[V]) Sure() V
- func (a *Vce[V]) Zero()
- type Ve
- type Vme
- func (a *Vme[K, V]) Fine()
- func (a *Vme[K, V]) Good()
- func (a *Vme[K, V]) Have()
- func (a *Vme[K, V]) Len(n int)
- func (a *Vme[K, V]) Length(n int)
- func (a *Vme[K, V]) Nice() map[K]V
- func (a *Vme[K, V]) None()
- func (a *Vme[K, V]) Safe()
- func (a *Vme[K, V]) Size(n int)
- func (a *Vme[K, V]) Some() map[K]V
- func (a *Vme[K, V]) Sure() map[K]V
- func (a *Vme[K, V]) Void()
- func (a *Vme[K, V]) Zero()
- type Vne
- type Vpe
- type Vse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func C1 ¶ added in v1.0.16
func C1[T1 comparable](v1 T1, err error) T1
func C2 ¶ added in v1.0.16
func C2[T1, T2 comparable](v1 T1, v2 T2, err error) (T1, T2)
func Nice ¶
func Nice[V comparable](v V) V
Nice means the value is not zero value, then return value
func Sure ¶
func Sure[V comparable](v V) V
Sure means the value is not zero value, then return value
func Zero ¶
func Zero[V comparable](v V)
Zero means the value is a zero value, num is 0, string is "", PTR is none.
Types ¶
type Vae ¶
type Vce ¶
type Vce[V comparable] struct { V V E error *Ve[V] }
func VCE ¶
func VCE[V comparable](val V, err error) *Vce[V]
VCE accept two params. one is comparable and one is error interface
type Vme ¶
type Vme[K comparable, V any] struct { V map[K]V E error *Ve[map[K]V] }
type Vpe ¶
type Vpe[V any] struct { V *V E error *Ve[*V] //这里最好不要继承自 vce-comparable 这个类型,因为指针比较地址相等或者不想等的意义不太大,因此不要提供这些无意义的功能 }
Source Files ¶
Click to show internal directories.
Click to hide internal directories.