Skip to content

take address of field for comparison #310

@elagergren-spideroak

Description

@elagergren-spideroak

I'm using intsets.Sparse as a field in a struct:

type T struct {
   v intsets.Sparse
   // other fields
}

When traversing T, the field v is copied, causing all methods to fail. This precludes the use of Transformer.

Ideally, there would be an Option that would take the address of the field for use with other Options. Notably, Sparse has an Equals(*Sparse) bool method, so perhaps an alternate idea is to allow different equality methods? But I'm not sure whether go-cmp will take the address of a field in order to invoke the Equal method.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions