troubleshoot
troubleshoot copied to clipboard
Remove errors package in favour of the standard library approach
Describe the rationale for the suggested feature.
The go errors package we use in troubleshoot was deprecated in favour of golang's native error handling which was introduced in go 1.13. Lets remove any references of this library in the code base
Describe the feature
Remove any references of errors.* and replace them with fmt.Errorf(.... Here are some before/after examples
// Before: Wrapping errors
errors.Wrap(err, "failed to create directory")
// After: Wrapping errors. NOTE the newly introduced %w formatting verb
fmt.Errorf("failed to create directory: %w", err)
// before
errors.Errorf("cannot create symlink, result in %q not found", relativeFilePath)
// after
fmt.Errorf("cannot create symlink, result in %q not found", relativeFilePath)
Describe alternatives you've considered
Leave the deprecated dependency in the code base