go_common_kit

package module
v0.0.0-...-eeaec48 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 12, 2024 License: MIT Imports: 6 Imported by: 0

README

go-common-kit

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ComparatorRealNumber

func ComparatorRealNumber[T generics.RealNumber](src, dst T) int

func ToPtr

func ToPtr[T any](t T) *T

Types

type AnyValue

type AnyValue struct {
	Val any
	Err error
}

func (AnyValue) AsBytes

func (av AnyValue) AsBytes() ([]byte, error)

func (AnyValue) AsFloat32

func (av AnyValue) AsFloat32() (float32, error)

func (AnyValue) AsFloat64

func (av AnyValue) AsFloat64() (float64, error)

func (AnyValue) AsInt

func (av AnyValue) AsInt() (int, error)

func (AnyValue) AsInt16

func (av AnyValue) AsInt16() (int16, error)

func (AnyValue) AsInt32

func (av AnyValue) AsInt32() (int32, error)

func (AnyValue) AsInt64

func (av AnyValue) AsInt64() (int64, error)

func (AnyValue) AsInt8

func (av AnyValue) AsInt8() (int8, error)

func (AnyValue) AsString

func (av AnyValue) AsString() (string, error)

func (AnyValue) AsUint

func (av AnyValue) AsUint() (uint, error)

func (AnyValue) AsUint16

func (av AnyValue) AsUint16() (uint16, error)

func (AnyValue) AsUint32

func (av AnyValue) AsUint32() (uint32, error)

func (AnyValue) AsUint64

func (av AnyValue) AsUint64() (uint64, error)

func (AnyValue) AsUint8

func (av AnyValue) AsUint8() (uint8, error)

func (AnyValue) Bool

func (av AnyValue) Bool() (bool, error)

Bool 返回 bool 数据

func (AnyValue) BoolOrDefault

func (av AnyValue) BoolOrDefault(def bool) bool

BoolOrDefault 返回 bool 数据,或者默认值

func (AnyValue) Bytes

func (av AnyValue) Bytes() ([]byte, error)

Bytes 返回 []byte 数据

func (AnyValue) BytesOrDefault

func (av AnyValue) BytesOrDefault(def []byte) []byte

BytesOrDefault 返回 []byte 数据,或者默认值

func (AnyValue) Float32

func (av AnyValue) Float32() (float32, error)

Float32 返回 float32 数据

func (AnyValue) Float32OrDefault

func (av AnyValue) Float32OrDefault(def float32) float32

Float32OrDefault 返回 float32 数据,或者默认值

func (AnyValue) Float64

func (av AnyValue) Float64() (float64, error)

Float64 返回 float64 数据

func (AnyValue) Float64OrDefault

func (av AnyValue) Float64OrDefault(def float64) float64

Float64OrDefault 返回 float64 数据,或者默认值

func (AnyValue) Int

func (av AnyValue) Int() (int, error)

func (AnyValue) Int16

func (av AnyValue) Int16() (int16, error)

func (AnyValue) Int16OrDefault

func (av AnyValue) Int16OrDefault(def int16) int16

func (AnyValue) Int32

func (av AnyValue) Int32() (int32, error)

Int32 返回 int32 数据

func (AnyValue) Int32OrDefault

func (av AnyValue) Int32OrDefault(def int32) int32

Int32OrDefault 返回 int32 数据,或者默认值

func (AnyValue) Int64

func (av AnyValue) Int64() (int64, error)

Int64 返回 int64 数据

func (AnyValue) Int64OrDefault

func (av AnyValue) Int64OrDefault(def int64) int64

Int64OrDefault 返回 int64 数据,或者默认值

func (AnyValue) Int8

func (av AnyValue) Int8() (int8, error)

func (AnyValue) Int8OrDefault

func (av AnyValue) Int8OrDefault(def int8) int8

func (AnyValue) IntOrDefault

func (av AnyValue) IntOrDefault(def int) int

IntOrDefault 返回 int 数据,或者默认值

func (AnyValue) JSONScan

func (av AnyValue) JSONScan(val any) error

JSONScan 将 val 转化为一个对象

func (AnyValue) String

func (av AnyValue) String() (string, error)

String 返回 string 数据

func (AnyValue) StringOrDefault

func (av AnyValue) StringOrDefault(def string) string

StringOrDefault 返回 string 数据,或者默认值

func (AnyValue) Uint

func (av AnyValue) Uint() (uint, error)

func (AnyValue) Uint16

func (av AnyValue) Uint16() (uint16, error)

func (AnyValue) Uint16OrDefault

func (av AnyValue) Uint16OrDefault(def uint16) uint16

func (AnyValue) Uint32

func (av AnyValue) Uint32() (uint32, error)

Uint32 返回 uint32 数据

func (AnyValue) Uint32OrDefault

func (av AnyValue) Uint32OrDefault(def uint32) uint32

Uint32OrDefault 返回 uint32 数据,或者默认值

func (AnyValue) Uint64

func (av AnyValue) Uint64() (uint64, error)

Uint64 返回 uint64 数据

func (AnyValue) Uint64OrDefault

func (av AnyValue) Uint64OrDefault(def uint64) uint64

Uint64OrDefault 返回 uint64 数据,或者默认值

func (AnyValue) Uint8

func (av AnyValue) Uint8() (uint8, error)

func (AnyValue) Uint8OrDefault

func (av AnyValue) Uint8OrDefault(def uint8) uint8

func (AnyValue) UintOrDefault

func (av AnyValue) UintOrDefault(def uint) uint

UintOrDefault 返回 uint 数据,或者默认值

type Comparator

type Comparator[T any] func(src T, dst T) int

Directories

Path Synopsis
bean
internal

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL