Skip to content

panic: unsupported key type *foo #53

@jeremy-giaco

Description

@jeremy-giaco

Apparently it is not currently possible to add a reference to a struct as a key in the hashmap. This is valid in the native map, sync.Map, etc.

In this example, i create an "Attribute" and "Value" struct, then try to create a map of key: *Attribute, value:*Value...
https://play.golang.org/p/m2RkogzD-82

Error returned is: panic: unsupported key type *main.Attribute

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions