tool

package
v0.0.0-...-e0f7dcb Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2022 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BytesToStr

func BytesToStr(b []byte) string

字节数组转字符串

func Check

func Check(err error)

错误判断

func CopyFile

func CopyFile(srcFile string, destFile string) error

复制文件内容工具函数

func Exists

func Exists(path string) bool

判断目录是否存在

func Exit

func Exit()

退出处理

func GetArgs

func GetArgs(args []string, skip int) ([]string, error)

获取命令行配置参数

func GetFileName

func GetFileName(file_name string) string

获取合法文件名

func GetTagAttribute

func GetTagAttribute(attributeList string, key string) string

func GetTimeStamp

func GetTimeStamp(bflag bool) int64

获取本地时间与世界标准时间差秒数或者毫秒数

func GetUrlFileName

func GetUrlFileName(url string) string

通过url获取文件名

func IfString

func IfString(condition bool, trueVal string, falseVal string) string

字符串判断三目

func IsDir

func IsDir(path string) bool

判断是否是目录

func IsFile

func IsFile(path string) bool

判断是否是文件

func JsParser

func JsParser(filePath string, functionName string, args ...interface{}) (result string)

func ParseCommandLine

func ParseCommandLine(command string) ([]string, error)

解析字符串命令行

func Pause

func Pause()

按任意键退出

func ReadFile

func ReadFile(file_path string) ([]byte, error)

读取文件工具函数

func StrToBytes

func StrToBytes(s string) []byte

字符串转字节数组

func WriteFile

func WriteFile(file_path string, text string) error

写文件工具函数

Types

This section is empty.

Jump to

Keyboard shortcuts

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