MCPcopy Create free account

hub / github.com/chanxuehong/util / functions

Functions199 in github.com/chanxuehong/util

↓ 27 callersMethodWriteString
(s string)
http/timeout_handler.go:188
↓ 19 callersMethodStore
(val bool)
atomic/bool.go:15
↓ 18 callersMethodLoad
zero value represents false
atomic/bool.go:10
↓ 8 callersMethodCompareAndSwap
(old, new bool)
atomic/bool.go:32
↓ 5 callersFunctionQueryEscape
QueryEscape escapes the string so it can be safely placed inside a URL query.
url/url.go:19
↓ 4 callersMethodSwap
(new bool)
atomic/bool.go:23
↓ 3 callersFunctionPaginator0
获取分页编号序列, 页码从 0 开始, 序列中非负整数表示页码, -1 表示省略, 如 [0,1,-1,8,9,10,11,12,-1,15,16] 表示 0,1,...,8,9,10,11,12,...,15,16 pageNum: 页面数量, 大于 0 的整数 currentP
paginator.go:11
↓ 3 callersMethodString
String 将 Version 格式化成 major.minor.patch 的格式.
version/version.go:25
↓ 3 callersFunctionmarshalInt
(n int64)
json/json.go:8
↓ 3 callersFunctionmarshalUint
(n uint64)
json/json.go:16
↓ 3 callersFunctionunmarshalInt
(data []byte, typeName string, bitSize int)
json/json.go:24
↓ 3 callersFunctionunmarshalUint
(data []byte, typeName string, bitSize int)
json/json.go:46
↓ 3 callersMethodwriteHeader
(code int)
http/timeout_handler.go:183
↓ 2 callersFunctionCompare
Compare 比较两个 Version 的大小. 返回 -1 表示 a < b 返回 0 表示 a == b 返回 +1 表示 a > b
version/compare.go:7
↓ 2 callersFunctionCompare
Compare 比较两个 Version 的大小. 返回 -1 表示 a < b 返回 0 表示 a == b 返回 +1 表示 a > b
version.4part/compare.go:7
↓ 2 callersMethodMarshalText
MarshalText 将 Money 编码成 xxxx.yz 这样以 '元' 为单位的字符串.
money/money.go:38
↓ 2 callersFunctionNewRoundRobinIndex
(bound int)
round_robin.go:9
↓ 2 callersMethodNext
()
round_robin.go:24
↓ 2 callersFunctionQueryUnescape
QueryUnescape does the inverse transformation of QueryEscape, converting each 3-byte encoded substring of the form "%AB" into the hex-decoded byte 0xA
url/url.go:63
↓ 2 callersMethodUnmarshalText
UnmarshalText 将 xxxx.yz 这样以 '元' 为单位的字符串解码到 Money 中.
money/money.go:128
↓ 2 callersMethodUnmarshalText
UnmarshalText 将 xxxx.yz 这样以 '元' 为单位的字符串解码到 Money2 中.
money/money2.go:78
↓ 2 callersMethodWrite
(p []byte)
http/timeout_handler.go:159
↓ 2 callersMethodWriteHeader
(code int)
http/timeout_handler.go:174
↓ 2 callersFunctionshouldEscape
(c byte)
url/url.go:6
↓ 1 callersFunctionDecodeXMLToMap
DecodeXMLToMap decodes xml reading from io.Reader and returns the first-level sub-node key-value set, if the first-level sub-node contains child nodes
xml.go:13
↓ 1 callersMethodEncode
Encode encodes the values into ``URL encoded'' form ("bar=baz&foo=quux") sorted by key.
url/values.go:63
↓ 1 callersFunctionFromStdBoolSlice
FromStdBoolSlice cast []bool to []Bool
json/helper.go:81
↓ 1 callersFunctionFromStdFloat64Slice
FromStdFloat64Slice cast []float64 to []Float64
json/helper.go:71
↓ 1 callersFunctionFromStdInt32Slice
FromStdInt32Slice cast []int32 to []Int32
json/helper.go:31
↓ 1 callersFunctionFromStdInt64Slice
FromStdInt64Slice cast []int64 to []Int64
json/helper.go:41
↓ 1 callersFunctionFromStdIntSlice
FromStdIntSlice cast []int to []Int
json/helper.go:11
↓ 1 callersFunctionFromStdUint32Slice
FromStdUint32Slice cast []uint32 to []Uint32
json/helper.go:51
↓ 1 callersFunctionFromStdUint64Slice
FromStdUint64Slice cast []uint64 to []Uint64
json/helper.go:61
↓ 1 callersFunctionFromStdUintSlice
FromStdUintSlice cast []uint to []Uint
json/helper.go:21
↓ 1 callersMethodGet
()
http/timeout_handler.go:20
↓ 1 callersMethodHeader
()
http/timeout_handler.go:157
↓ 1 callersMethodMarshalJSON
MarshalJSON 将 Money 编码成 "xxxx.yz" 这样以 '元' 为单位的字符串.
money/money.go:44
↓ 1 callersMethodMarshalText
MarshalText 将 Money2 编码成 xxxx.yz 这样以 '元' 为单位的字符串.
money/money2.go:63
↓ 1 callersFunctionNew
(major, minor, patch int)
version/version.go:16
↓ 1 callersFunctionNew
(major, minor, build, revision int)
version.4part/version.go:16
↓ 1 callersFunctionPaginator1
获取分页编号序列, 页码从 1 开始, 序列中正整数表示页码, -1 表示省略, 如 [1,2,-1,8,9,10,11,12,-1,15,16] 表示 1,2,...,8,9,10,11,12,...,15,16 pageNum: 页面数量, 大于 0 的整数 currentPa
paginator.go:106
↓ 1 callersFunctionParse
Parse 解析 x, x.y, x.y.z 格式的字符串到 Version 对象, 如果成功 ok 为 true, 否则为 false.
version/version.go:38
↓ 1 callersFunctionParse
Parse 解析 x, x.y, x.y.z, x.y.z.w 格式的字符串到 Version 对象, 如果成功 ok 为 true, 否则为 false.
version.4part/version.go:39
↓ 1 callersMethodPut
(*bytes.Buffer)
http/timeout_handler.go:21
↓ 1 callersMethodString
String 将 Version 格式化成 major.minor.build.revision 的格式.
version.4part/version.go:26
↓ 1 callersFunctionToStdBoolSlice
ToStdBoolSlice cast []Bool to []bool
json/helper.go:76
↓ 1 callersFunctionToStdFloat64Slice
ToStdFloat64Slice cast []Float64 to []float64
json/helper.go:66
↓ 1 callersFunctionToStdInt32Slice
ToStdInt32Slice cast []Int32 to []int32
json/helper.go:26
↓ 1 callersFunctionToStdInt64Slice
ToStdInt64Slice cast []Int64 to []int64
json/helper.go:36
↓ 1 callersFunctionToStdIntSlice
ToStdIntSlice cast []Int to []int
json/helper.go:6
↓ 1 callersFunctionToStdUint32Slice
ToStdUint32Slice cast []Uint32 to []uint32
json/helper.go:46
↓ 1 callersFunctionToStdUint64Slice
ToStdUint64Slice cast []Uint64 to []uint64
json/helper.go:56
↓ 1 callersFunctionToStdUintSlice
ToStdUintSlice cast []Uint to []uint
json/helper.go:16
↓ 1 callersFunctionTrimSpace
去掉 src 开头和结尾的空白, 如果 src 包括换行, 去掉换行和这个换行符两边的空白 NOTE: 根据 '\n' 来分行的, 某些系统或软件用 '\r' 来分行, 则不能正常工作.
trim.go:12
↓ 1 callersFunctionTrimSpaceString
去掉 src 开头和结尾的空白, 如果 src 包括换行, 去掉换行和这个换行符两边的空白 NOTE: 根据 '\n' 来分行的, 某些系统或软件用 '\r' 来分行, 则不能正常工作.
trim.go:22
↓ 1 callersMethodUnmarshalTextString
UnmarshalTextString 将 xxxx.yz 这样以 '元' 为单位的字符串解码到 Money 中.
money/money.go:133
↓ 1 callersMethoderrorBody
()
http/timeout_handler.go:67
↓ 1 callersMethoderrorCode
()
http/timeout_handler.go:60
MethodAdd
Add adds the value to key. It appends to any existing values associated with key.
url/values.go:52
FunctionBenchmarkLoadAtomicValue
(b *testing.B)
atomic/bool_test.go:190
FunctionBenchmarkLoadBool
(b *testing.B)
atomic/bool_test.go:178
FunctionBenchmarkRandIntn
(b *testing.B)
round_robin_test.go:31
FunctionBenchmarkRoundRobinIndex_Next
(b *testing.B)
round_robin_test.go:21
FunctionBenchmarkStoreAtomicValue
(b *testing.B)
atomic/bool_test.go:213
FunctionBenchmarkStoreBool
(b *testing.B)
atomic/bool_test.go:203
FunctionBool
Bool is a helper routine that allocates a new bool value to store v and returns a pointer to it.
helper.go:5
FunctionBool2Int
转换 bool 类型到 int 类型 true 转换为 1, false 转换为 0
conv.go:5
MethodCloseNotify
()
http/timeout_handler.go:203
MethodCompare
Compare 比较 v 和 v2 的大小. 返回 -1 表示 v < v2 返回 0 表示 v == v2 返回 +1 表示 v > v2
version/version.go:33
MethodCompare
Compare 比较 v 和 v2 的大小. 返回 -1 表示 v < v2 返回 0 表示 v == v2 返回 +1 表示 v > v2
version.4part/version.go:34
MethodDel
Del deletes the values associated with key.
url/values.go:57
FunctionEncodeXMLFromMap
EncodeXMLFromMap encodes map[string]string to io.Writer with xml format. NOTE: This function requires the rootname argument and the keys of m (type ma
xml.go:61
FunctionFloat32
Float32 is a helper routine that allocates a new float32 value to store v and returns a pointer to it.
helper.go:29
FunctionFloat64
Float64 is a helper routine that allocates a new float64 value to store v and returns a pointer to it.
helper.go:35
MethodGet
Get gets the first value associated with the given key. If there are no values associated with the key, Get returns the empty string. To access multip
url/values.go:33
FunctionIPv4List
IPv4List 获取本机的 ipv4 列表.
net/ipv4.go:8
FunctionInt
Int is a helper routine that allocates a new int value to store v and returns a pointer to it.
helper.go:11
FunctionInt32
Int32 is a helper routine that allocates a new int32 value to store v and returns a pointer to it.
helper.go:17
FunctionInt64
Int64 is a helper routine that allocates a new int64 value to store v and returns a pointer to it.
helper.go:23
FunctionIsChinaMobile
检验是否为合法的中国手机号, 不是那么太精细 只要是 13,14,15,18 开头的 11 位数字就认为是中国手机号
check/regexp.go:43
FunctionIsChinaMobileString
同 func IsChinaMobile(b []byte) bool
check/regexp.go:51
FunctionIsChineseName
IsChineseName 检验是否为有效的中文姓名(比如 张三, 李四, 张三·李四)
check/regexp.go:117
FunctionIsChineseNameEx
IsChineseNameEx 检验是否为有效的中文姓名(比如 张三, 李四, 张三·李四), 主要功能和 IsChineseName 相同, 但是如果姓名中包含不规范的间隔符, 会自动修正为正确的间隔符 '\u00B7', 并返回正确的结果.
check/regexp.go:128
FunctionIsChineseNameString
同 IsChineseName(b []byte) bool
check/regexp.go:122
FunctionIsChineseNameStringEx
同 IsChineseNameEx(b []byte) ([]byte, bool)
check/regexp.go:146
FunctionIsMail
检验是否为合法的电子邮箱, 考虑到各个网站的 mail 要求不一样, 这里匹配比较宽松 邮箱用户名可以包含 0-9, A-Z, a-z, -, _, . 开头字母不能是 -, _, . 结尾字母不能是 -, _, . -, _, . 这三个连接字母任意两个不能连续, 如不能出现 --, __, ..
check/regexp.go:101
FunctionIsMailString
同 func IsMail(b []byte) bool
check/regexp.go:109
FunctionIsNickname
检验是否为合法的昵称, 合法的字符有 0-9, A-Z, a-z, _, 汉字 字符 '_' 只能出现在中间且不能重复, 如 "__"
check/regexp.go:60
FunctionIsNicknameString
同 func IsNickname(b []byte) bool
check/regexp.go:68
FunctionIsUserName
检验是否为合法的用户名, 合法的字符有 0-9, A-Z, a-z, _ 第一个字母不能为 _, 0-9 最后一个字母不能为 _, 且 _ 不能连续
check/regexp.go:78
FunctionIsUserNameString
同 func IsName(b []byte) bool
check/regexp.go:86
MethodMarshalJSON
MarshalJSON 实现了 json.Marshaler
json/int64.go:14
MethodMarshalJSON
MarshalJSON 实现了 json.Marshaler
json/float64.go:17
MethodMarshalJSON
MarshalJSON 实现了 json.Marshaler
json/uint64.go:14
MethodMarshalJSON
MarshalJSON 实现了 json.Marshaler
json/uint_json.go:15
MethodMarshalJSON
MarshalJSON 实现了 json.Marshaler
json/float32.go:17
MethodMarshalJSON
MarshalJSON 实现了 json.Marshaler
json/uint32.go:14
MethodMarshalJSON
MarshalJSON 实现了 json.Marshaler
json/int32.go:14
MethodMarshalJSON
MarshalJSON 实现了 json.Marshaler
json/int_json.go:15
MethodMarshalJSON
MarshalJSON 将 Money2 编码成 "xxxx.yz" 这样以 '元' 为单位的字符串.
money/money2.go:68
next →1–100 of 199, ranked by callers