Documentation ¶
Index ¶
- Constants
- func Bytes2str(b []byte) string
- func BytesToInt64(buf []byte) int64
- func Catch(err error)
- func Cmdexec(cmd string) string
- func DisplaySize(raw float64) string
- func DuplicateIntArray(m []int) []int
- func DuplicateStringArray(m []string) []string
- func ExistIntArray(s []int, e int) bool
- func ExistStringArray(s []string, e string) bool
- func FloatRound(f float64, n int) float64
- func FormatFileSize(fileSize int64) (size string)
- func GetDifferentIntArray(sourceList, sourceList2 []int) (result []int)
- func GetDifferentStringArray(sourceList, sourceList2 []string) (result []string)
- func GetStrLine(file, str string) ([]string, error)
- func Int64ToBytes(i int64) []byte
- func IntToInt64(value int) int64
- func IsDir(fileAddr string) bool
- func ParseMorningTime(t time.Time) time.Time
- func ReadConfigIni(key, value string) (result string)
- func RemoveDuplicates(a []string) (ret []string)
- func RemoveElement(slice []interface{}, elem interface{}) []interface{}
- func ResolveTime(seconds uint64) string
- func ScanDirBySuffix(dirName, suffix string) []string
- func SetCommandStd(cmd *exec.Cmd) (stdout, stderr *bytes.Buffer)
- func SingleSlashToDoubleSlash(path string) string
- func Str2bytes(s string) []byte
- func StringToInt(value string) (i int)
- func TimeToString(time time.Time) string
- func TimeToStringDay(time time.Time) string
Constants ¶
View Source
const ( //定义Format 日期显示 FormatDay = "2006-01-02" //定义Format 日期时分秒显示 FormatDayHourMinSecond = "2006-01-02 15:04:05" )
时间常量
Variables ¶
This section is empty.
Functions ¶
func FormatFileSize ¶
FormatFileSize 字节的单位转换 保留两位小数
func GetDifferentIntArray ¶
数组取出不同元素 放入结果 sourceList中的元素不在sourceList2中 则取到result中
func GetDifferentStringArray ¶
数组取出不同元素 放入结果 sourceList中的元素不在sourceList2中 则取到result中
func RemoveDuplicates ¶
RemoveDuplicates 去除重复字符串和空格
func RemoveElement ¶
func RemoveElement(slice []interface{}, elem interface{}) []interface{}
func ScanDirBySuffix ¶
ScanDirBySuffix 扫描当前目录下文件,不递归扫描,指定后缀
func SetCommandStd ¶
SetCommandStd cmd Grep
func SingleSlashToDoubleSlash ¶
SingleSlashToDoubleSlash 把系统获取的路径/ 转换为//格式
func TimeToStringDay ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.