Documentation ¶
Index ¶
- Constants
- func CallOrderedInit()
- func DVal[T any](condition bool, dval T, fn func() T) T
- func DirectPbwGet[T any](obj any, dval ...T) *T
- func FindEmptyString(vals map[string]any) string
- func GetDefault[T any](val *T, dval T) T
- func GetFirst[T any](ls []T, dval ...T) *T
- func GrpcCall[T any, R any](clog clog.Instance, ...) (*R, error)
- func GrpcClient[T any](address string, fn func(cc grpc.ClientConnInterface) T) (T, error)
- func GrpcHeader(ctx context.Context) map[string]string
- func IfHaveIn[T comparable](val T, in ...T) bool
- func IsNil(val any) bool
- func MapCopy[K comparable, V any](original map[K]V) map[K]V
- func MultiToLower(vals ...any)
- func MultiTrimSpace(vals ...any)
- func OrderedInit(level int, fn func())
- func PbwDouble(val *float64) *wrapperspb.DoubleValue
- func PbwFloat(val *float64) *wrapperspb.FloatValue
- func PbwGet[T any](obj any, dval ...T) (*T, bool)
- func PbwInt32(val *int) *wrapperspb.Int32Value
- func PbwString(val *string) *wrapperspb.StringValue
- func Ptr[T any](val T) *T
- func PtrGetFirst[T any](ls []*T, dval ...*T) *T
- func StringEqual(val *string, compare string) bool
- func Ternary[T any](condition bool, a, b T) T
- func Ternary2LR[A any, B any](condition bool, l, r func() (A, B)) (A, B)
- func TernaryLR[T any](condition bool, a func() T, b func() T) T
- func TernaryR[T any](condition bool, a T, b func() T) T
- func TrimSpace(val *string) *string
- func Val[T any](condition bool, fn func() T) *T
Constants ¶
View Source
const ( OrderedLevelRepo = 2 OrderedLevelVDB = 3 OrderedLevelHandler = 4 OrderedLevelService = 9 )
Variables ¶
This section is empty.
Functions ¶
func CallOrderedInit ¶
func CallOrderedInit()
func DirectPbwGet ¶
func FindEmptyString ¶ added in v1.0.21
func GetDefault ¶
func GetDefault[T any](val *T, dval T) T
func GrpcClient ¶
func GrpcClient[T any](address string, fn func(cc grpc.ClientConnInterface) T) (T, error)
func IfHaveIn ¶
func IfHaveIn[T comparable](val T, in ...T) bool
func MapCopy ¶
func MapCopy[K comparable, V any](original map[K]V) map[K]V
func MultiToLower ¶ added in v1.0.21
func MultiToLower(vals ...any)
func MultiTrimSpace ¶ added in v1.0.21
func MultiTrimSpace(vals ...any)
func OrderedInit ¶
func OrderedInit(level int, fn func())
func PbwDouble ¶ added in v1.0.9
func PbwDouble(val *float64) *wrapperspb.DoubleValue
func PbwFloat ¶ added in v1.0.9
func PbwFloat(val *float64) *wrapperspb.FloatValue
func PbwInt32 ¶
func PbwInt32(val *int) *wrapperspb.Int32Value
func PbwString ¶
func PbwString(val *string) *wrapperspb.StringValue
func PtrGetFirst ¶
func PtrGetFirst[T any](ls []*T, dval ...*T) *T
func StringEqual ¶ added in v1.0.21
func Ternary2LR ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.