aboutsummaryrefslogtreecommitdiff
path: root/cmp/options.go
diff options
context:
space:
mode:
Diffstat (limited to 'cmp/options.go')
-rw-r--r--cmp/options.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/cmp/options.go b/cmp/options.go
index 409e803..abbd2a6 100644
--- a/cmp/options.go
+++ b/cmp/options.go
@@ -455,6 +455,11 @@ func (r Result) ByFunc() bool {
return r.flags&reportByFunc != 0
}
+// ByCycle reports whether a reference cycle was detected.
+func (r Result) ByCycle() bool {
+ return r.flags&reportByCycle != 0
+}
+
type resultFlags uint
const (
@@ -465,6 +470,7 @@ const (
reportByIgnore
reportByMethod
reportByFunc
+ reportByCycle
)
// Reporter is an Option that can be passed to Equal. When Equal traverses