utils

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 15, 2025 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrCommandNotFound = errors.New("file not found") // 未找到文件错误
)

Functions

func DownloadFile

func DownloadFile(url string, path string, cmd string) error

下载文件到指定路径

func FileExists

func FileExists(path string) bool

判断文件是否存在

func MakesureDir

func MakesureDir(dir string) error

确保目录存在,不存在则创建

func RetryDownloadFile

func RetryDownloadFile(url string, path string, cmd 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