utils

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2020 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Verbose bool
)

Functions

func CopyDir

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

CopyDir recursively copies a directory tree, attempting to preserve permissions. Source directory must exist, destination directory must *not* exist. Symlinks are ignored and skipped.

func CopyFile

func CopyFile(src, dst string, sync bool) (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. The file mode will be copied from the source and the copied data is synced/flushed to stable storage.

func Exists

func Exists(path string) (bool, error)

Exists returns whether the given file or directory exists.

func FindBindingPath added in v0.0.2

func FindBindingPath(projectRootDir string) (path string, err error)

func FindModPath added in v0.0.16

func FindModPath(dir string) (path string, err error)

func FirstCharToLower

func FirstCharToLower(s string) string

func FirstCharToUpper

func FirstCharToUpper(s string) string

func GetThreadID

func GetThreadID() int

func PrintColor

func PrintColor(s string)

func PrintColorln

func PrintColorln(s string)

func RunCommand

func RunCommand(env []string, dir, cmd string, args ...string) (err error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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