Documentation ¶
Index ¶
- func SliceMerge[T any](a []T, b []T) []T
- type Complex
- type EnableStatus
- type Float
- type GroupEnableStatus
- type Integer
- type Ordered
- type Signed
- type String
- func (s String) Int16Slice(sep string) ([]int16, error)
- func (s String) Int32Slice(sep string) ([]int32, error)
- func (s String) Int64Slice(sep string) ([]int64, error)
- func (s String) Int8Slice(sep string) ([]int8, error)
- func (s String) IntSlice(sep string) ([]int, error)
- func (s String) Split(sep string) []string
- func (s String) Uint16Slice(sep string) ([]uint16, error)
- func (s String) Uint32Slice(sep string) ([]uint32, error)
- func (s String) Uint64Slice(sep string) ([]uint64, error)
- func (s String) Uint8Slice(sep string) ([]uint8, error)
- func (s String) UintSlice(sep string) ([]uint, error)
- type StringSlice
- type Unsigned
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SliceMerge ¶ added in v0.0.5
func SliceMerge[T any](a []T, b []T) []T
Types ¶
type Complex ¶ added in v0.0.5
type Complex interface { ~complex64 | ~complex128 }
type EnableStatus ¶ added in v0.0.5
type EnableStatus int32
EnableStatus enable and disable status, default value is enable
func (*EnableStatus) Disable ¶ added in v0.0.5
func (es *EnableStatus) Disable()
Disable set status disable
func (*EnableStatus) Enable ¶ added in v0.0.5
func (es *EnableStatus) Enable()
Enable set status enable
func (*EnableStatus) IsEnable ¶ added in v0.0.5
func (es *EnableStatus) IsEnable() bool
IsEnable return is enable
func (*EnableStatus) SetEnable ¶ added in v0.0.5
func (es *EnableStatus) SetEnable(enable bool)
SetEnable set status
func (*EnableStatus) String ¶ added in v0.0.5
func (es *EnableStatus) String() string
String return status desc
type GroupEnableStatus ¶ added in v0.0.5
type GroupEnableStatus struct { // Default 未设置时的默认值 Default bool // contains filtered or unexported fields }
GroupEnableStatus 一组状态,默认未设置会返回 false
func (*GroupEnableStatus) IsEnable ¶ added in v0.0.5
func (gs *GroupEnableStatus) IsEnable(key any) bool
IsEnable 获取状态
func (*GroupEnableStatus) Range ¶ added in v0.0.5
func (gs *GroupEnableStatus) Range(fn func(key any, enable bool) bool)
Range 遍历所有已设置的值
func (*GroupEnableStatus) SetAllEnable ¶ added in v0.0.5
func (gs *GroupEnableStatus) SetAllEnable(enable bool)
SetAllEnable 设置所有的状态,设置后,也会调整默认状态为此值
如 默认值为 false,若 key="key123" 未设置,调用 IsEnable("key123") 会返回 false, 当 SetAllEnable(true) 之后,再次调用 IsEnable("key123") 会返回 true
func (*GroupEnableStatus) SetEnable ¶ added in v0.0.5
func (gs *GroupEnableStatus) SetEnable(key any, enable bool)
SetEnable 设置状态
func (*GroupEnableStatus) String ¶ added in v0.0.5
func (gs *GroupEnableStatus) String() string
String 打印出所有已经设置的状态信息
type String ¶
type String string
String 字符串
func (String) Int16Slice ¶ added in v0.0.5
Int16Slice 转换为 []int16
func (String) Int32Slice ¶ added in v0.0.5
Int32Slice 转换为 []int32
func (String) Int64Slice ¶ added in v0.0.5
Int64Slice 转换为 []int32
func (String) Uint16Slice ¶ added in v0.0.5
Uint16Slice 转换为 []uint16
func (String) Uint32Slice ¶ added in v0.0.5
Uint32Slice 转换为 []uint32
func (String) Uint64Slice ¶ added in v0.0.5
Uint64Slice 转换为 []uint64
func (String) Uint8Slice ¶ added in v0.0.5
Uint8Slice 转换为 []uint8
type StringSlice ¶
type StringSlice []string
StringSlice alias off []string
func (*StringSlice) Delete ¶ added in v0.0.5
func (ss *StringSlice) Delete(values ...string)
Delete 删除对应的值
Click to show internal directories.
Click to hide internal directories.