Versions in this module Expand all Collapse all v0 v0.0.3 Apr 28, 2024 v0.0.2 Apr 28, 2024 Changes in this version + const B + const GB + const KB + const MB + func ArrayToString(array []interface{}) string + func AutoClearCode(filepath string, codeData string) error + func AutoInjectionCode(filepath string, funcName string, codeData string) error + func BcryptCheck(password, hash string) bool + func BcryptHash(password string) string + func BreakPointContinue(content []byte, fileName string, contentNumber int, contentTotal int, ...) (string, error) + func CheckMd5(content []byte, chunkMd5 string) (CanUpload bool) + func CreateDir(dirs ...string) (err error) + func DateFormat(t time.Time) string + func DeLFile(filePath string) error + func FileExist(path string) bool + func FileMove(src string, dst string) (err error) + func FirstLower(s string) string + func FirstUpper(s string) string + func InterfaceToStruct(data interface{}, v any) error + func JSONLoadFromFile(filePath string, data interface{}) error + func JsonField(msg string, v any) zap.Field + func MD5V(str []byte, b ...byte) string + func MaheHump(s string) string + func MakeAddr(host string, port int) string + func MakeFile(fileName string, FileMd5 string) (string, error) + func MapToStruct(data map[string]interface{}, v any) error + func MilliStamp() int64 + func MillisToTime(millis int64) time.Time + func NowString() string + func ParseDuration(d string) (time.Duration, error) + func PathExists(path string) (bool, error) + func Pointer[T any](in T) (out *T) + func Reload() error + func RemoveChunk(FileMd5 string) error + func Sort(length int, less func(i, j int) bool, swap func(i, j int)) + func Stamp() int64 + func StructToMap(obj interface{}) map[string]interface + func TimeField(msg string, t time.Time) zap.Field + func ToJSON(v any) string + func TrimSpace(target interface{}) + func Unzip(zipFile string, destDir string) ([]string, error) + func UpdateStampOffset(stamp int64) + func ZipFiles(filename string, files []string, oldForm, newForm string) error + type Cache struct + func NewCache() *Cache + func (c *Cache) Get(key string) (interface{}, bool) + func (c *Cache) Set(key string, value interface{}) + type CountRef struct + func MakeCountRef() *CountRef + func (c *CountRef) Count() int + func (c *CountRef) Release() int + func (c *CountRef) Retain() int + type Cpu struct + Cores int + Cpus []float64 + func InitCPU() (c Cpu, err error) + type Disk struct + TotalGB int + TotalMB int + UsedGB int + UsedMB int + UsedPercent int + func InitDisk() (d Disk, err error) + type Element interface + type Os struct + Compiler string + GOOS string + GoVersion string + NumCPU int + NumGoroutine int + func InitOS() (o Os) + type Ram struct + TotalMB int + UsedMB int + UsedPercent int + func InitRAM() (r Ram, err error) + type Server struct + Cpu Cpu + Disk Disk + Os Os + Ram Ram + type Sorter struct + Length int + LessFunc func(i, j int) bool + SwapFunc func(i, j int) + func (c Sorter) Len() int + func (c Sorter) Less(i, j int) bool + func (c Sorter) Swap(i, j int) + type Stack struct + func NewStack(cap int) *Stack + func (stack *Stack) Cap() int + func (stack *Stack) Clear() + func (stack *Stack) Empty() bool + func (stack *Stack) Len() int + func (stack *Stack) Peek() (ele Element, err error) + func (stack *Stack) Pop() (ele Element, err error) + func (stack *Stack) Push(element Element) (err error) + func (stack *Stack) Top() Element + type Time time.Time + func (t *Time) UnmarshalJSON(data []byte) (err error) + func (t Time) MarshalJSON() ([]byte, error) + func (t Time) String() string + type Timer struct + func StartTimer(d time.Duration, cb func(*Timer) bool) *Timer + func (c *Timer) Chan() <-chan time.Time + func (c *Timer) Reset() + func (c *Timer) Stop()