Skip to content

Commit

Permalink
feat: add IgnoreGoStringer()
Browse files Browse the repository at this point in the history
  • Loading branch information
alecthomas committed Apr 6, 2024
1 parent 5491cb3 commit 802610d
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions assert.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,13 @@ func OmitEmpty() CompareOption {
}
}

// IgnoreGoStringer ignores GoStringer implementations when comparing.
func IgnoreGoStringer() CompareOption {
return func() []repr.Option {
return []repr.Option{repr.IgnoreGoStringer()}
}
}

// Compare two values for equality and return true or false.
func Compare[T any](t testing.TB, x, y T, options ...CompareOption) bool {
return objectsAreEqual(x, y, options...)
Expand Down

0 comments on commit 802610d

Please sign in to comment.