utils

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: May 5, 2025 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CleanDir

func CleanDir(dst string) (err error)

删除目录及子目录下所有内容

func CopyDir

func CopyDir(src, dst string) (err error)

通过Bash命令复制整个目录,只能运行于Linux或MacOS 当dst结尾带斜杠时,复制为dst下的子目录

func CopyFile

func CopyFile(src, dst string) (err error)

CopyFile copies the contents of the file named src to the file named by dst. The file will be created if it does not already exist. If the destination file exists, all it's contents will be replaced by the contents of the source file.

func NewConfig

func NewConfig(name, desc string) *service.Config

func PathExist

func PathExist(path string) bool

func PathNotExist

func PathNotExist(path string) bool

func WinMain

func WinMain(name, desc string, run func())

Types

type Program

type Program struct {
	Main func()
}

func (*Program) Start

func (p *Program) Start(s service.Service) error

func (Program) Stop

func (Program) Stop(s service.Service) error

Jump to

Keyboard shortcuts

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