Documentation
¶
Index ¶
- Constants
- func DecorateTestError(err error, config configuration.Configuration) error
- func GetWorkingDirectory(err *snyk_errors.Error) ([]string, bool)
- func ProcessSnykErrorsInChain(err error, processor SnykErrorProcessor) error
- func WithWorkingDirectory(directories []string) snyk_errors.Option
- type SnykErrorProcessor
Constants ¶
View Source
const (
WorkingDirectoryKey = "current-working-directory"
)
Variables ¶
This section is empty.
Functions ¶
func DecorateTestError ¶
func DecorateTestError(err error, config configuration.Configuration) error
DecorateTestError adds working directory metadata to all Snyk errors in the error chain
func GetWorkingDirectory ¶
func GetWorkingDirectory(err *snyk_errors.Error) ([]string, bool)
func ProcessSnykErrorsInChain ¶
func ProcessSnykErrorsInChain(err error, processor SnykErrorProcessor) error
ProcessSnykErrorsInChain iterates through an error chain and applies the processor function to each Snyk error found, while preserving the error chain structure.
func WithWorkingDirectory ¶
func WithWorkingDirectory(directories []string) snyk_errors.Option
WithWorkingDirectory creates an option that adds given working directory to the error
Types ¶
type SnykErrorProcessor ¶
type SnykErrorProcessor func(*snyk_errors.Error)
SnykErrorProcessor is a function type that processes a Snyk error
Click to show internal directories.
Click to hide internal directories.