base

package
v0.0.0-...-e809a50 Latest Latest
Warning

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

Go to latest
Published: Mar 18, 2022 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	RandomLowercase type_ = 1 // 小写字母
	RandomMajuscule       = 2 // 大写字母
	RandomNumber          = 4 // 数字
	RandomSymbol          = 8 // 符号
	RandomAll             = RandomLowercase | RandomMajuscule | RandomNumber | RandomSymbol
)
View Source
const TimeFormatString = "2006-01-02 15:04:05"

Variables

This section is empty.

Functions

func FormatTime

func FormatTime(i int64) string

FormatTime 将时间缀格式为YYYY-MM-DD HH:mm:ss

func GetCurrentDirectory

func GetCurrentDirectory() string

GetCurrentDirectory 返回工作目录

func IsNumber

func IsNumber(s string) bool

IsNumber 判断一个字符串是不是全都是数字

func PathExists

func PathExists(path string) (bool, error)

PathExists 判断目录或者文件是否存在

func RandomString

func RandomString(length uint, contain type_) string

RandomString 随机字符串

func RemoveSameFromStringSlice

func RemoveSameFromStringSlice(slice []string) []string

RemoveSameFromStringSlice 移除 []string 中的相同元素

Types

This section is empty.

Jump to

Keyboard shortcuts

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