internal

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2022 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	LogFormatLogfmt = "logfmt"
	LogFormatJSON   = "json"

	LogLevelError = "error"
	LogLevelWarn  = "warn"
	LogLevelInfo  = "info"
	LogLevelDebug = "debug"
)

Variables

This section is empty.

Functions

func CloseWithErrCapturef

func CloseWithErrCapturef(err *error, closer io.Closer, format string, a ...interface{})

CloseWithErrCapturef runs function and on error return error by argument including the given error..

func CloseWithErrLogf

func CloseWithErrLogf(logger log.Logger, closer io.Closer, format string, a ...interface{})

CloseWithErrLogf is making sure we log every error, even those from best effort tiny closers.

func NewLogger

func NewLogger(logLevel, logFormat, name string) log.Logger

Types

type MultiError

type MultiError struct {
	// contains filtered or unexported fields
}

The MultiError type implements the error interface, and contains the Errors used to construct it.

func (*MultiError) Add

func (me *MultiError) Add(err error)

Add adds the error to the error list if it is not nil.

func (*MultiError) Err

func (me *MultiError) Err() error

Err returns the error list as an error or nil if it is empty.

func (*MultiError) Error

func (me *MultiError) Error() string

Returns a concatenated string of the contained errors.

Directories

Path Synopsis
Package plugin for caching directories using given backends
Package plugin for caching directories using given backends

Jump to

Keyboard shortcuts

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