tool

package
v0.0.0-...-c9558e9 Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2023 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateDir

func CreateDir(path string, all bool) error

创建目录

func DirExists

func DirExists(path string) bool

检验目录是否存在

func DirFormat

func DirFormat() string

自动判断系统并返回使用的格式

func GetAppRootDir

func GetAppRootDir() string

获取应用根目录

func GetFileBaseName

func GetFileBaseName(filepath string) string

获取文件名称(不带后缀)

func GetIntRandomNumber

func GetIntRandomNumber(min int64, max int64) int64

获取某范围的随机整数

func GetNowDateTime

func GetNowDateTime() string

func GetRandomCodeString

func GetRandomCodeString(len int) string

获取随机字符串

func GetTimestampDateTimeString

func GetTimestampDateTimeString(timeStamp int64) string

func InSliceString

func InSliceString(s string, slices []string) bool

验证 s 是否存在 slice 中

func Md5String

func Md5String(str string) string

文本md5

func PlayAudioSec

func PlayAudioSec(audio string, playSec float64) (err error)

播放音频指定时长【可循环】

func RepeatStr

func RepeatStr(str string, s string, length int, before bool) string

func SetRandomSeed

func SetRandomSeed()

设置随机种子

func VaildFile

func VaildFile(file string) bool

校验文件是否存在

func WinDir

func WinDir(dir string) string

Windows下Dir路径统一Linux格式

Types

This section is empty.

Jump to

Keyboard shortcuts

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