utils

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Jul 24, 2025 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConsoleBlue

func ConsoleBlue(content string)

func ConsoleCyan

func ConsoleCyan(content string)

func ConsoleGreen

func ConsoleGreen(content string)

func ConsoleRed

func ConsoleRed(content string)

func ConsoleYellow

func ConsoleYellow(content string)

func CreateFileIfNotExist

func CreateFileIfNotExist(filePath string) error

CreateFileIfNotExist 检查文件是否存在,如果不存在则创建

func GenRandomNumber

func GenRandomNumber(min, max int) int

GenRandomNumber 生成指定范围内的随机数 min: 最小值,max: 最大值

func HttpGet

func HttpGet(client *http.Client, url string) (*http.Response, error)

func MkdirIfNotExist

func MkdirIfNotExist(path string) error

MkdirIfNotExist 检查目录是否存在,如果不存在则创建 该函数会创建所有必要的父目录 例如,如果路径是 "/a/b/c",而 "/a" 和 "/a/b" 不存在,则会创建 "/a" 和 "/a/b" 如果路径已经存在,则不会执行任何操作

func WordBlue

func WordBlue(format string, v ...interface{}) string

func WordCyan

func WordCyan(format string, v ...interface{}) string

func WordGreen

func WordGreen(format string, v ...interface{}) string

func WordRed

func WordRed(format string, v ...interface{}) string

func WordYellow

func WordYellow(format string, v ...interface{}) string

Types

This section is empty.

Jump to

Keyboard shortcuts

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