utils

package
v1.6.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 2, 2021 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Contains

func Contains(obj interface{}, target interface{}) bool

func CopyFile

func CopyFile(src, dst string) bool

CopyFile 拷贝文件

func CopyPath

func CopyPath(src, dst string) bool

CopyPath 拷贝目录

func DirDot

func DirDot() string

func Explode added in v1.6.2

func Explode(delimiter, datastr string) (arr []string)

Explode 将字符串按字符拆成数组

func FileExists

func FileExists(path string) (bool, error)

func GetCurrentDirectory

func GetCurrentDirectory() string

func GetFileInfo

func GetFileInfo(src string) os.FileInfo

GetFileInfo 获取文件信息

func GetRandStr added in v1.6.2

func GetRandStr(n int) (randStr string)

func LowercaseFirst

func LowercaseFirst(str string) string

func Md5String added in v1.6.2

func Md5String(str string) string

func Md5ToLower

func Md5ToLower(str string) string

Md5ToLower md5大写

func Md5ToUpper

func Md5ToUpper(str string) string

Md5ToUpper md5小写

func MergeMap

func MergeMap(source map[string][]string, tagret map[string][]string)

func PadLeft

func PadLeft(s string, pad string, plength int) string

func PathExists

func PathExists(path string) (bool, error)

func RemoveFile

func RemoveFile(filePath string) error

func Substr added in v1.6.2

func Substr(str string, start int, length int) string

Substr字符串截取

func UppercaseFirst

func UppercaseFirst(str string) string

func WriteFile

func WriteFile(filePath string, content string) error

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL