utils

package
v0.0.0-...-c3f54fb Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Yellow = "\033[33m"
	Reset  = "\033[0m"
)
View Source
const (
	DateTimeFormat = "2006-01-02 15:04:05"
	DateFormat     = "2006-01-02"
	TimeFormat     = "15:04:05"

	CRLF = "\r\n"
)

Variables

This section is empty.

Functions

func BuildCmdLine

func BuildCmdLine(commandName string, args ...[]byte) [][]byte

func ComputeCapacity

func ComputeCapacity(param int) (size int)

计算比param参数大,并满足是2的N次幂, 最近接近param的数值size

func ExecDir

func ExecDir() string

ExecDir 当前可执行程序目录

func FileExists

func FileExists(filename string) bool

func Fnv32

func Fnv32(key string) uint32
func Logo() string

随机logo, just for fun,yoho!!!

func MakeDir

func MakeDir(src string) error

func OpenFile

func OpenFile(fileName, dir string) (*os.File, error)

打开文件(如果文件不存在自动创建)

func RandString

func RandString(n int) string

生成随机字符串

Types

This section is empty.

Jump to

Keyboard shortcuts

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