Documentation ¶
Index ¶
- Variables
- func Float2String(i interface{}) string
- func Href2Url(href, baseURL string) string
- func IPv4IntToString(ipInt int64) (string, error)
- func IPv4StringToInt(ipStr string) (int64, error)
- func Limit4Float32(min, mid, max float32) float32
- func Limit4Float64(min, mid, max float64) float64
- func Limit4Int(min, mid, max int) int
- func Limit4Int64(min, mid, max int64) int64
- func SliceToInterfaces(slice interface{}) []interface{}
- func StructTagMap(tag string, model interface{}) (map[string]interface{}, error)
- type DayTicker
- type OnceMutex
- type OperationQueue
Constants ¶
This section is empty.
Variables ¶
View Source
var Math = math{}
Math for call kmath func simply without type
View Source
var Unique = unique{}
Unique support []string, []int, []int64
Functions ¶
func IPv4IntToString ¶
IPv4IntToString 2130706433 -> "127.0.0.1"
func IPv4StringToInt ¶
IPv4StringToInt "127.0.0.1" -> 2130706433
func Limit4Float32 ¶
Limit4Float32 return mid ∈ [min, max]
func Limit4Float64 ¶
Limit4Float64 return mid ∈ [min, max]
func SliceToInterfaces ¶
func SliceToInterfaces(slice interface{}) []interface{}
SliceToInterfaces slice -> []interface{}
func StructTagMap ¶
StructTagMap map[tag key] value address
Types ¶
type DayTicker ¶
type DayTicker struct {
// contains filtered or unexported fields
}
DayTicker once every day
func NewDayTicker ¶
NewDayTicker (hour, minute, second)
type OnceMutex ¶
type OnceMutex struct {
// contains filtered or unexported fields
}
OnceMutex sync.Once + Reset
type OperationQueue ¶
type OperationQueue struct {
// contains filtered or unexported fields
}
OperationQueue task queue
func (*OperationQueue) MaxConcurrentOperationCount ¶
func (slf *OperationQueue) MaxConcurrentOperationCount(cnt ...int) int
MaxConcurrentOperationCount cnt >= 1
Get when cnt is empty Set when cnt has value
func (*OperationQueue) Wait ¶
func (slf *OperationQueue) Wait()
Wait blocks until the WaitGroup counter is zero.
Source Files ¶
Click to show internal directories.
Click to hide internal directories.