unit

package
v0.0.0-...-1aad945 Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2020 License: GPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	EnableLogEnvName  = "confSyncer"
	EnableLogEnvValue = "enableLog"
)

Variables

This section is empty.

Functions

func Copy

func Copy(src, dist string) error

Copy can copy file or directory to dist path

func CopyDirectory

func CopyDirectory(srcDir, dist string) error

CopyDirectory can copy directory to dist path

func CopyFile

func CopyFile(src, dist string) error

CopyFile can copy file to dist path

func CopySymLink(src, dist string) error

CopySymLink is copy symlink to dist

func CreateFile

func CreateFile(filename string) error

CreateFile will create file

func CreateIfNotExists

func CreateIfNotExists(dir string, perm os.FileMode) error

CreateIfNotExists create dir if folder is exists

func Exists

func Exists(filePath string) bool

Exists to check filePath is exists

func GitClone

func GitClone(gitRepoPath string, dir string) error

func GitCommitAndPush

func GitCommitAndPush(dir string) error

func GitPull

func GitPull(dir string) error

func IsDir

func IsDir(path string) bool

func IsFile

func IsFile(path string) bool

func MakeDirWithFilePath

func MakeDirWithFilePath(path string) error

func Move

func Move(src, dist string) error

Move is move src to dist

func RealPath

func RealPath(path string) (string, error)

func RemoveFiles

func RemoveFiles(path string) error

RemoveFiles is remove files

func RunCommandInShell

func RunCommandInShell(command string)

RunCommandInShell call bash shell && return stdout and stderr

func RunCommandInShellGetOutput

func RunCommandInShellGetOutput(command string) (string, error)

RunCommandInShellGetOutput return output in once time

func WriteFile

func WriteFile(dir string, content []byte) error

WriteFile is write content into file

Types

This section is empty.

Jump to

Keyboard shortcuts

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