utils

package
v0.1.6 Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2021 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CacheDir

func CacheDir() string

CacheDir :

func DeleteNil

func DeleteNil(errs []error) (new []error)

DeleteNil :

func Exec

func Exec(command string, args []string) (string, error)

Exec :

func Exists

func Exists(path string) (bool, error)

Exists :

func FileNameWithoutExtension

func FileNameWithoutExtension(path string) string

FileNameWithoutExtension :

func FileWalk

func FileWalk(root string, walkFn func(r io.Reader, path string) error) error

FileWalk :

func GenWorkers

func GenWorkers(num int) chan<- func()

GenWorkers :

func GetDefaultLogDir

func GetDefaultLogDir() string

GetDefaultLogDir :

func SetLogger

func SetLogger(logDir string, quiet, debug, logJSON bool)

SetLogger :

Types

type Errors added in v0.1.6

type Errors []error

Errors has a set of errors that occurred in GORM

func (Errors) Add added in v0.1.6

func (errs Errors) Add(newErrors ...error) Errors

Add adds an error to a given slice of errors

func (Errors) Error added in v0.1.6

func (errs Errors) Error() string

Error takes a slice of all errors that have occurred and returns it as a formatted string

func (Errors) GetErrors added in v0.1.6

func (errs Errors) GetErrors() []error

GetErrors gets all errors that have occurred and returns a slice of errors (Error type)

Jump to

Keyboard shortcuts

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