Documentation ¶
Index ¶
- func CloseWithErrCapture(err *error, closer io.Closer, format string, a ...interface{})
- func CloseWithLogOnErr(logger log.Logger, closer io.Closer, format string, args ...interface{})
- func DeleteAll(dir string, ignoreDirs ...string) error
- func ExhaustCloseWithErrCapture(err *error, r io.ReadCloser, format string, a ...interface{})
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CloseWithErrCapture ¶
CloseWithErrCapture closes closer and wraps any error with the provided message and assigns it to err.
func CloseWithLogOnErr ¶
CloseWithLogOnErr closes an io.Closer and logs any relevant error from it wrapped with the provided format string and args.
func DeleteAll ¶
DeleteAll deletes all files and directories inside the given dir except for the ignoreDirs directories. NOTE: DeleteAll is not idempotent.
func ExhaustCloseWithErrCapture ¶
func ExhaustCloseWithErrCapture(err *error, r io.ReadCloser, format string, a ...interface{})
ExhaustCloseWithErrCapture closes the io.ReadCloser with error capture but exhausts the reader before.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.