Documentation
¶
Overview ¶
Package warning provides a simple way to handle errors that should not stop execution (return err), but rather continue.
Common Go idiom is this:
if err != nil { return err }
But what if you wanted to distinguish between error that ends execution and error that should just be logged? This package provides you with just that.
if err != nil && warning.IsWarning(err) { // This is executed only if err is not a warning. return }
It also works well with https://github.com/pkg/errors and https://github.com/hashicorp/go-multierror.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.