utils

package
v1.0.0-rc2 Latest Latest
Warning

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

Go to latest
Published: Dec 29, 2021 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckDebug

func CheckDebug(msg interface{})

CheckDebug prints the debug msg with the prefix 'Debug:'.

func CheckErrFatal

func CheckErrFatal(err interface{})

CheckErrFatal prints the msg with the prefix 'Error:' and exits with error code 1. If the msg is nil, it does nothing.

func CheckErrNonFatal

func CheckErrNonFatal(err interface{})

CheckErrNonFatal prints the msg with the prefix 'Error:' but does not exit the code. If the msg is nil, it does nothing.

func CopyDirectory

func CopyDirectory(scrDir, dest string) error

CopyDirectory copies content of one directory to another

func CreateFile

func CreateFile(name string, data []byte, perm fs.FileMode) error

CreateFile checks if the file already exists, if not then will create it and set it up

func Exists

func Exists(path string) (bool, error)

Exists returns whether the given file or directory exists, returns true if location exists

Types

This section is empty.

Jump to

Keyboard shortcuts

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