Documentation ¶
Index ¶
- func Contains(list []string, value string) bool
- func Delete(filePath string) (err error)
- func Exists(filePath string) bool
- func FmtErr(prefix string, errs []error) error
- func Load(filePath string) (text string, err error)
- func MakeAllDir(dirPath string, perm ...fs.FileMode) error
- func MkdirAll(filePath string, perm ...fs.FileMode) error
- func PanicIfEmptyFloat(list []float64)
- func PanicIfEmptyInt(list []int)
- func PanicIfEmptyString(list []string)
- func PanicIfNil(is ...interface{})
- func Save(text, filePath string, perm ...fs.FileMode) error
- func ValueOrDefaultString(s *string, defaultString ...string) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Delete ¶
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 Load ¶
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
MakeAllDir creates all directories below that filepath.
func MkdirAll ¶ added in v1.20.2
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 ValueOrDefaultString ¶ added in v1.23.0
ValueOrDefaultString safe dereferencing of strings
Types ¶
This section is empty.