Skip to content

Default support for the netip package #339

Closed
@crawshaw

Description

@crawshaw

Now that netip is in the stdlib, it would be nice if go-cmp supported it by default. Today you need to add:

cmp.Comparer(func(x, y netip.Addr) bool { return x == y }),
cmp.Comparer(func(x, y netip.Prefix) bool { return x == y }),

to make cmp.Diff work with types that include netip types.

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