Documentation ¶
Index ¶
- Variables
- func FormatCommunicationRate(fileSize float64) (size string)
- func FormatFileSize(fileSize uint64) (size string)
- func GbkToUtf8(str []byte) (b []byte, err error)
- func GetAllFile(pathname string) []string
- func IsDir(path string) (bool, error)
- func PathExists(path string) (bool, error)
- func Pause()
- func StrToGBK(str string) (string, error)
- func StrToUtf8(str string) (string, error)
- func Utf8ToGbk(str []byte) (b []byte, err error)
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // PathError ... PathError = errcode.NewError(baseCode+1, "路径异常:") )
Functions ¶
func FormatCommunicationRate ¶
FormatCommunicationRate 通讯速率换算 传入参数单位为 B/s
func FormatFileSize ¶
FormatFileSize 字节的单位转换 保留两位小数
func StrToGBK ¶
transform UTF-8 string to GBK string and replace it, if transformed success, returned nil error, or died by error message
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.