package
Version:
v0.0.0-...-f59b33f
Opens a new window with list of versions in this module.
Published: May 30, 2024
License: MIT
Opens a new window with license information.
Imports: 2
Opens a new window with list of imports.
Imported by: 1
Opens a new window with list of known importers.
Documentation
¶
-
func Diff[T cmp.Ordered](a []T, b []T) []T
-
func Max[T cmp.Ordered](values ...T) T
-
func Min[T cmp.Ordered](values ...T) T
-
func Must[T any](v1 T, err error) T
-
func Must2[T1, T2 any](v1 T1, v2 T2, err error) (T1, T2)
-
func Must3[T1, T2, T3 any](v1 T1, v2 T2, v3 T3, err error) (T1, T2, T3)
-
func Must4[T1, T2, T3, T4 any](v1 T1, v2 T2, v3 T3, v4 T4, err error) (T1, T2, T3, T4)
-
func Ptr[T any](value T) *T
-
func Through[T any](value T, callbacks ...func(value T)) T
-
func With[T any](value T, callbacks ...func(value T) T) T
Diff return the elements in a that are not in b
Max returns the max value in given values
Min returns the min value in given values
Must return the value, but panics when err is not nil
func Must2[T1, T2 any](v1 T1, v2 T2, err error) (T1, T2)
Must2 return the values, but panics when err is not nil
func Must3[T1, T2, T3 any](v1 T1, v2 T2, v3 T3, err error) (T1, T2, T3)
Must3 return the values, but panics when err is not nil
func Must4[T1, T2, T3, T4 any](v1 T1, v2 T2, v3 T3, v4 T4, err error) (T1, T2, T3, T4)
Must4 return the values, but panics when err is not nil
func Ptr[T any](value T) *T
Ptr returns the pointer to the specific value
func Through[T any](value T, callbacks ...func(value T)) T
Through call the given callbacks with the given value then return the value.
func With[T any](value T, callbacks ...func(value T) T) T
With returns the given value, passed through the given callbacks.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.