Skip to content

net/http: Server panics with non-comparable Listener (because of map[net.Listener]struct{}) #24812

Closed
@pam4

Description

@pam4

https://play.golang.org/p/_O9zzZhdd-z

Usually net.Listeners are pointers, therefore comparable, but I would expect non-pointer net.Listeners to work just fine.
If my expectation is correct, perhaps this behavior should be documented.
Or the type of Server.listeners could be changed to map[*net.Listener]struct{}.

Metadata

Metadata

Assignees

No one assigned

    Labels

    FrozenDueToAgeNeedsFixThe path to resolution is known, but the work has not been done.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions