Skip to content

Add helper predicates for HasType and Is

Warren Gifford requested to merge cc/predicate-helpers into main

Created by: camdencheek

This adds a couple of small helpers to make working with errors.Ignore a little easier. Now, if you just want to ignore a certain error type, instead of creating a function for it, you can just do something like

err = errors.Ignore(err, errors.IsPred(context.Canceled))

Test plan

Tests have been updated to use these new helpers.

Merge request reports

Loading