1// Copyright 2021, The Go Authors. All rights reserved. 2// Use of this source code is governed by a BSD-style 3// license that can be found in the LICENSE file. 4 5//go:build go1.13 6// +build go1.13 7 8package cmpopts 9 10import "errors" 11 12func compareErrors(x, y interface{}) bool { 13 xe := x.(error) 14 ye := y.(error) 15 return errors.Is(xe, ye) || errors.Is(ye, xe) 16} 17