Documentation ¶
Index ¶
- Constants
- func AesDecrypt(ciphertext, key string) (string, error)
- func AesEncrypt(text, key string) (string, error)
- func ArrayContains(array interface{}, val interface{}) bool
- func ArrayContainsBool(array []bool, val bool) bool
- func ArrayContainsComplex128(array []complex128, val complex128) bool
- func ArrayContainsComplex64(array []complex64, val complex64) bool
- func ArrayContainsFloat32(array []float32, val float32) bool
- func ArrayContainsFloat64(array []float64, val float64) bool
- func ArrayContainsInt(array []int, val int) bool
- func ArrayContainsInt32(array []int32, val int32) bool
- func ArrayContainsInt64(array []int64, val int64) bool
- func ArrayContainsString(array []string, val string) bool
- func ArrayContainsUInt(array []uint, val uint) bool
- func ArrayIndex(array interface{}, val interface{}) (index int)
- func ArrayIndexBool(array []bool, val bool) (index int)
- func ArrayIndexComplex128(array []complex128, val complex128) (index int)
- func ArrayIndexComplex64(array []complex64, val complex64) (index int)
- func ArrayIndexFloat32(array []float32, val float32) (index int)
- func ArrayIndexFloat64(array []float64, val float64) (index int)
- func ArrayIndexInt(array []int, val int) (index int)
- func ArrayIndexInt32(array []int32, val int32) (index int)
- func ArrayIndexInt64(array []int64, val int64) (index int)
- func ArrayIndexString(array []string, val string) (index int)
- func ArrayIndexUInt(array []uint, val uint) (index int)
- func DirExists(dirpath string) bool
- func DirExistsOrCreate(dirpath string) error
- func DirFilesRemove(dir, regex string) error
- func DirSize(path string) (int64, error)
- func DirSizeFormat(path string) (string, error)
- func FileAutoReDownloadName(path string) string
- func FileCopy(src, dst string, segmentSize int64) error
- func FileExists(filepath string) bool
- func FileList(root string, hasHide bool, isRecursion bool, fn filepath.WalkFunc) error
- func FileReadForInterface(path string, i interface{}) error
- func FileReadToMap(path string) (map[string]interface{}, error)
- func FileWriteWithInterface(path string, data interface{}) error
- func FilesMerge(target string, sources []string, perm fs.FileMode) error
- func FilesRemove(paths []string) error
- func FormatFloat(f float64, digit int16) float64
- func FormatSize(size int64) string
- func FormatTemplate(tpl string, i interface{}) string
- func FormatTimeDT(t time.Time) string
- func FuncConfirm(msg string) bool
- func IDGen() string
- func MapConverForInterface(m map[string]interface{}, i interface{}) error
- func Md5(str string) string
- func Md5File(path string) (string, error)
- func NewFileFilter(root string, handlerFn func(paths []string) error) *filefilter
- func PathDirExists(path string) bool
- func PathExists(path string) bool
- func StringFromReader(r io.Reader) (string, error)
- func ZipDir(src, dst string) (err error)
- func ZipFile(src, dst string) (err error)
- type ConfirmFunc
- type FileFilterFunc
- type FileHandlerFunc
- type URL
Constants ¶
const ( PermFile fs.FileMode = 0666 PermDir = 0755 FileSegmentSize = 8 * 1024 * 1024 )
Variables ¶
This section is empty.
Functions ¶
func ArrayContains ¶
func ArrayContains(array interface{}, val interface{}) bool
Returns the value is in the array
func ArrayContainsBool ¶
Returns the bool value is in the array
func ArrayContainsComplex128 ¶
func ArrayContainsComplex128(array []complex128, val complex128) bool
Returns the uint complex128 is in the array
func ArrayContainsComplex64 ¶
Returns the uint complex64 is in the array
func ArrayContainsFloat32 ¶
Returns the float32 value is in the array
func ArrayContainsFloat64 ¶
Returns the float64 value is in the array
func ArrayContainsInt ¶
IntContains Returns the int value is in the array
func ArrayContainsInt32 ¶
Returns the int32 value is in the array
func ArrayContainsInt64 ¶
Returns the int64 value is in the array
func ArrayContainsString ¶
Returns the string value is in the array
func ArrayContainsUInt ¶
Returns the uint value is in the array
func ArrayIndex ¶
func ArrayIndex(array interface{}, val interface{}) (index int)
Returns the index position of the val in array
func ArrayIndexBool ¶
Returns the index position of the bool val in array
func ArrayIndexComplex128 ¶
func ArrayIndexComplex128(array []complex128, val complex128) (index int)
Returns the index position of the complex128 val in array
func ArrayIndexComplex64 ¶
Returns the index position of the complex64 val in array
func ArrayIndexFloat32 ¶
Returns the index position of the float32 val in array
func ArrayIndexFloat64 ¶
Returns the index position of the float64 val in array
func ArrayIndexInt ¶
Returns the index position of the int val in array
func ArrayIndexInt32 ¶
Returns the index position of the int32 val in array
func ArrayIndexInt64 ¶
Returns the index position of the int64 val in array
func ArrayIndexString ¶
Returns the index position of the string val in array
func ArrayIndexUInt ¶
Returns the index position of the uint val in array
func DirFilesRemove ¶
func DirSizeFormat ¶
Get dir file total size and format
func FileAutoReDownloadName ¶
自动对下载地址进行重命名 examples: ~/download/main.go ~/download/main(1).go ~/download/main(2).go
func FileReadForInterface ¶
func FileReadToMap ¶
read file content to map instance
func FileWriteWithInterface ¶
func FilesMerge ¶ added in v0.0.7
合并文件
func FilesRemove ¶
func FormatTemplate ¶ added in v0.0.9
format template
func FormatTimeDT ¶ added in v0.0.9
func FuncConfirm ¶ added in v0.0.9
func MapConverForInterface ¶
map 转换为 interface