1
0
mirror of https://github.com/duke-git/lancet.git synced 2026-02-04 12:52:28 +08:00

doc: add docment and playground demo for v2.1.19

This commit is contained in:
dudaodong
2023-04-18 15:21:03 +08:00
parent 52ea64bc33
commit fcb3b97b45
10 changed files with 49 additions and 16 deletions

View File

@@ -371,13 +371,13 @@ func IsGBK(data []byte) bool {
}
// IsNumberStr check if the value is number(integer, float) or not.
// Play: todo
// Play: https://go.dev/play/p/mdJHOAvtsvF
func IsNumber(v any) bool {
return IsInt(v) || IsFloat(v)
}
// IsFloat check if the value is float(float32, float34) or not.
// Play: todo
// Play: https://go.dev/play/p/vsyG-sxr99_Z
func IsFloat(v any) bool {
switch v.(type) {
case float32, float64:
@@ -387,7 +387,7 @@ func IsFloat(v any) bool {
}
// IsInt check if the value is integer(int, unit) or not.
// Play: todo
// Play: https://go.dev/play/p/eFoIHbgzl-z
func IsInt(v any) bool {
switch v.(type) {
case int, int8, int16, int32, int64, uint, uint8, uint16, uint32, uint64, uintptr: