Skip to content

stdhttp: Receive a mux as interface instead of *http.ServeMux #1718

@sonalys

Description

@sonalys

I'm currently implementing open-telemetry, and I want to have the route pattern as part of the operation name.
I would be able to get the method and route pattern by injecting a custom ServeMux during the handler initialization.

Following the open-closed principle, you should accept interfaces and return structs. Would it be possible to accept a mux interface instead of the *http.ServeMux struct?

I volunteer myself for implementing it if approved.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions