Skip to content

Impossible to just compare public elements of a struct. #1033

@rsheasby

Description

@rsheasby

Hi there. Firstly, thanks for the great library. I've only run into one gripe so far.

There doesn't seem to be a way to compare only the public fields of a struct. For some reason assert.Equal compares private fields too. Why do I need this? To compare protobuf messages. The public fields are the actual valuable info, and the private fields are implementation details like "sizeCache" which are unimportant but still frequently different.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions