Documentation
¶
Index ¶
- Constants
- func BytesToGB(bytes uint64) float64
- func DeepMergeMaps(base, news map[string]interface{})
- func FlushToDisk(fd *os.File) error
- func Int64ToUint64Safe(s int64) (uint64, error)
- func IsDir(path string) bool
- func IsExist(dirPath string) bool
- func IsStrictNumber(s string) (isNumber bool, isNegative bool, isFloat bool)
- func NewULID() string
- func NotNullString(s string) bool
- func RandomString(length int) string
- func ReleaseToPool(pools ...Reusable)
- func SearchInMap(m map[string]any, key string) []any
- func SplitArgs(args []string) []string
- func TrimDaemon(args []string) []string
- func Uint64ToInt64Safe(u uint64) (int64, error)
- type Reusable
Constants ¶
View Source
const Charset = "#abcdefghijklmnpqrstuvwxyzABCDEFGHIJKLMNPQRSTUVWXYZ123456789@"
Charset defines the set of characters to be used in generating random strings
Variables ¶
This section is empty.
Functions ¶
func DeepMergeMaps ¶
func DeepMergeMaps(base, news map[string]interface{})
func Int64ToUint64Safe ¶
把 int64 转 uint64 前做安全检查(防负)
func IsStrictNumber ¶
第一个 bool 值为 true 就是数字,第二个 bool 是负数就是 true ,第三个 bool 是小数 3 个 true 就是 -3.1415927
func NotNullString ¶
func RandomString ¶
RandomString returns a string of the specified length composed of characters from Charset
func ReleaseToPool ¶
func ReleaseToPool(pools ...Reusable)
ReleaseToPool releases one or more Reusable objects back to their respective pools. It accepts a variadic parameter of Reusable objects and returns them to the pool for reuse, helping to reduce memory allocations and improve performance.
func TrimDaemon ¶
TrimDaemon removes the "-daemon" or "--daemon" arguments from os.Args
Types ¶
Click to show internal directories.
Click to hide internal directories.