Documentation
¶
Index ¶
- func CheckNotExist(src string) bool
- func CheckPermission(src string) bool
- func Contains(arrayOrMap interface{}, val interface{}) (isExist bool)
- func CreateRandomNumber(len int) string
- func CreateRandomString(len int) string
- func EncodeMD5(value string) string
- func FileExists(path string) (bool, error)
- func GetDiffElement(arr1, arr2 []string) []string
- func GetExt(fileName string) string
- func GetIPRange(ipRange, splitStr string) (ipStart, ipEnd string)
- func GetSize(f multipart.File) (int, error)
- func IP2long(ipstr string) uint32
- func InIPRange(ip string, ipRange string, isEqual bool) (inRange bool)
- func IsInSameSection(IP1, IP2, mask string) bool
- func IsNotExistMkDir(src string) error
- func Long2IP(ipLong uint32) string
- func Md5Check(content, encrypted string) bool
- func Md5SumFile(file string) (value [md5.Size]byte, err error)
- func MkDir(src string) error
- func MustOpen(fileName, filePath string) (*os.File, error)
- func Open(name string, flag int, perm os.FileMode) (*os.File, error)
- func RemoveFile(fileName string) error
- func Round(number float64, decimal uint8) float64
- func StringArray2Int(data []string) []int
- func Substr(str string, start int, end int) string
- func TimeFormat(oldLayout, newLayout, oldTimeStr string) (string, error)
- func TimeToTimestamp(layout, timestr string) (int64, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckPermission ¶
CheckPermission check if the file has permission
func Contains ¶
func Contains(arrayOrMap interface{}, val interface{}) (isExist bool)
Contains 判断切片中是否包含某元素
func GetDiffElement ¶
GetDiffElement 计算两个数组或者切片的差集
func GetIPRange ¶
GetIPRange 得到ip范围 比如192.168.1.1-254
func IsInSameSection ¶
IsInSameSection 判断两个ip是否在同一个网段
func IsNotExistMkDir ¶
IsNotExistMkDir create a directory if it does not exist
func Md5SumFile ¶
Md5SumFile 得到文件的md5值
func TimeFormat ¶
TimeFormat 转换时间格式
func TimeToTimestamp ¶
TimeToTimestamp 将日期时间格式转换为时间戳
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.