MCPcopy
hub / github.com/stretchr/testify / ObjectsExportedFieldsAreEqual

Function ObjectsExportedFieldsAreEqual

assert/assertions.go:156–160  ·  view source on GitHub ↗

ObjectsExportedFieldsAreEqual determines if the exported (public) fields of two objects are considered equal. This comparison of only exported fields is applied recursively to nested data structures. This function does no assertion of any kind. Deprecated: Use [EqualExportedValues] instead.

(expected, actual interface{})

Source from the content-addressed store, hash-verified

154//
155// Deprecated: Use [EqualExportedValues] instead.
156func ObjectsExportedFieldsAreEqual(expected, actual interface{}) bool {
157 expectedCleaned := copyExportedFields(expected)
158 actualCleaned := copyExportedFields(actual)
159 return ObjectsAreEqualValues(expectedCleaned, actualCleaned)
160}
161
162// ObjectsAreEqualValues gets whether two objects are equal, or if their
163// values are equal.

Callers 1

Calls 2

copyExportedFieldsFunction · 0.85
ObjectsAreEqualValuesFunction · 0.85

Tested by 1