common

package
v0.0.0-...-f0a1fc9 Latest Latest
Warning

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

Go to latest
Published: Mar 8, 2019 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// DataDir - global data directory declaration
	DataDir = GetDefaultDataDir()

	// ConfigDir - configuration directory
	ConfigDir = filepath.FromSlash(fmt.Sprintf("%s/config", DataDir))
)

Functions

func ByteIsEqual

func ByteIsEqual(a []byte, b []byte) bool

ByteIsEqual - == for []byte

func CatchPanic

func CatchPanic(out *error)

CatchPanic catches any panic and writes the error to out.

func CreateDirIfDoesNotExit

func CreateDirIfDoesNotExit(dir string) error

CreateDirIfDoesNotExit - create given directory if does not exist

func GetDefaultDataDir

func GetDefaultDataDir() string

GetDefaultDataDir - get default data directory

func UnifyError

func UnifyError(e interface{}) error

UnifyError converts e to error.

Types

This section is empty.

Jump to

Keyboard shortcuts

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