utils

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2020 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Debug

func Debug(params ...interface{})

Debug print params

func FatalError

func FatalError(msg string, err error)

FatalError

func GetCurrentDir added in v0.8.0

func GetCurrentDir() string

GetCurrentDir return compiled executable file directory

func GetCurrentPath added in v0.8.0

func GetCurrentPath() string

GetCurrentPath return compiled executable file absolute path

func GetLocalIp

func GetLocalIp() (string, error)

GetLocalIp return local ip

func LogError

func LogError(msg string, err error)

LogError

func MergeMaps

func MergeMaps(items ...map[string]interface{}) map[string]interface{}

MergeMaps merge items

func Mkdir added in v0.8.0

func Mkdir(dir string, parents bool) error

Mkdir Create the DIRECTORY(ies), if they do not already exist parents no error if existing, make parent directories as needed

func PathExist added in v0.8.0

func PathExist(path string) bool

Exist check the given path exists

func SecurePanic

func SecurePanic(err error)

SecurePanic only panic when err not nil

func Trace

func Trace() []string

Trace return code trace info

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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