internal

package
v1.29.0 Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2021 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Contains added in v1.24.0

func Contains(list []string, value string) bool

func Delete

func Delete(filePath string) (err error)

Deletechecks if the given filePath exists. In case is does exist,the file is deleted. In case it doe sexist and it is a directory, the path and all of its children are deleted. In case the path does not exist, this function returnsan os.ErrNotExist error.

func Exists

func Exists(filePath string) bool

Exists reports whether the named file or directory exists.

func FmtErr added in v1.26.0

func FmtErr(prefix string, errs []error) error

error formatting

func Load

func Load(filePath string) (text string, err error)

Load allows to load a text from a given filePath that points to a file which contains the text

func MakeAllDir added in v1.27.0

func MakeAllDir(dirPath string, perm ...fs.FileMode) error

MakeAllDir creates all directories below that filepath.

func MkdirAll added in v1.20.2

func MkdirAll(filePath string, perm ...fs.FileMode) error

MkdirAll takes the file path and removes the file name from the file afterwards it creates all directories below that filepath.

func PanicIfEmptyFloat added in v1.23.0

func PanicIfEmptyFloat(list []float64)

func PanicIfEmptyInt added in v1.23.0

func PanicIfEmptyInt(list []int)

func PanicIfEmptyString added in v1.23.0

func PanicIfEmptyString(list []string)

func PanicIfNil added in v1.23.0

func PanicIfNil(is ...interface{})

PanifIfNil is a check that enforces the user to pass a valid pointer value

func Save

func Save(text, filePath string, perm ...fs.FileMode) error

Save allows to save the text at a given filePath

func ValueOrDefaultString added in v1.23.0

func ValueOrDefaultString(s *string, defaultString ...string) string

ValueOrDefaultString safe dereferencing of strings

Types

This section is empty.

Jump to

Keyboard shortcuts

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