util

package
v0.0.0-...-5dc3574 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2020 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeleteFile

func DeleteFile(filePath string) error

*

  • Delete file

func DirExists

func DirExists(filename string) bool

func FileExists

func FileExists(filePath string) bool

fileExists checks if a file exists and is not a directory before we try using it to prevent further errors.

func GetConfigFilePath

func GetConfigFilePath() string

*

  • The path to the file used for configuration

func GetDirTree

func GetDirTree(dirPath string, excludedList []string) (string, error)

*

  • Get the dir tree printed as the tree command, excluding some dirs

func IsLogInDebug

func IsLogInDebug() bool

*

  • Verify if the system is configured with a given level

func ReadConfig

func ReadConfig(configPath string, result interface{}) error

*

  • Read the configuration and update the reference of a provided struct represented by the given config path

func RegexProcessString

func RegexProcessString(regex *regexp.Regexp, str string) (map[string]string, error)

func SetUpLogs

func SetUpLogs(out io.Writer, level string) error

setUpLogs set the log output ans the log level

func SetupViperHomeConfig

func SetupViperHomeConfig(configFile, configName, extension, envPrefix string)

Types

This section is empty.

Jump to

Keyboard shortcuts

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