Documentation ¶
Index ¶
- func ApplyWithBackoff(f func() error) error
- func AppropriateToScan() bool
- func Contains(list []string, s string) bool
- func CopyFile(src string, dst string) (err error)
- func Exists(path string) bool
- func FileExists(filename string) bool
- func IsBool(value interface{}, key string) error
- func IsDirectory(path string) bool
- func IsInt(value interface{}, key string) error
- func IsNotEmpty(value interface{}, key string) error
- func MoveFile(src string, dst string) (err error)
- func NameOfFunction(pc uintptr) string
- type MultiError
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ApplyWithBackoff ¶
ApplyWithBackoff tries to apply the specified function using an exponential backoff algorithm. If the function eventually succeed nil is returned, otherwise the error returned by f.
func AppropriateToScan ¶ added in v0.0.27
func AppropriateToScan() bool
AppropriateToScan checks the current pipeline execution environment to see if it is appropriate to insert the app.
func Contains ¶
Contains checks whether the specified string is contained in the given string slice. Returns true if it does, false otherwise
func CopyFile ¶
CopyFile copies the contents of the file named src to the file named by dst. The file will be created if it does not already exist. If the destination file exists, all it's contents will be replaced by the contents of the source file. The file mode will be copied from the source and the copied data is synced/flushed to stable storage.
func Exists ¶
Exists checks whether the specified path exists. The implementation is opinionated, since in case of unexpected errors false is returned
func FileExists ¶ added in v0.0.27
FileExists checks if a file exists and is not a directory before we try using it to prevent further errors.
func IsDirectory ¶
IsDirectory checks whether the specified path is a directory. The implementation is opinionated, since in case of unexpected errors false is returned
func IsNotEmpty ¶
IsNotEmpty checks if value stored at given key is empty. if it is empty it returns an error.
func MoveFile ¶ added in v0.0.23
MoveFile renames the file named src to the file named by dst. If dst already exists and is not a directory, MoveFile replaces it
func NameOfFunction ¶
NameOfFunction gives name of the current function given program counter.
Types ¶
type MultiError ¶
type MultiError struct {
Errors []error
}
MultiError is a collection of errors.
func (*MultiError) Collect ¶
func (m *MultiError) Collect(err error)
Collect appends an error to this MultiError.
func (*MultiError) Empty ¶
func (m *MultiError) Empty() bool
Empty returns true if current MuiltiError is empty, false otherwise.