// find error in any wrapped error func As(err error, target interface{ … } // Is detects whether the error is equal to a given error. Errors // are considered equal by this function if they are matched by errors.Is // or if their contained errors are matched through errors.Is func Is(e error, original error) bool { … }