Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make ErrBadName checkable via errors.Is() (#1462)
* Make ErrBadName checkable via errors.Is() The function IsErrBadName says it is deprecated and directs the user to use errors.Is(), but that will never return true because this error is custom based on the tag value. This fixes that problem by implementing an Is() function on ErrBadName so that errors.Is() can properly identify the error as an ErrBadName. Usage can now be: errors.Is(err, &ErrBadName{}) Signed-off-by: Craig Jellick <craig@acorn.io> * Update pkg/name/errors_test.go Co-authored-by: Jason Hall <jason@chainguard.dev> Signed-off-by: Craig Jellick <craig@acorn.io> Co-authored-by: Jason Hall <jason@chainguard.dev>
- Loading branch information