Closed
Description
Currently it is not possible to dynamically register and deregister path handlers with a ServeMux
object. Once a handler for a path is registered, it cannot be changed or removed.
Solutions to work around this (such as wrapping ServeMux
) can lead to a growing map containing stale handlers.
The proposal is to add an Unregister
method with the following function signature:
func (mux *ServeMux) Unregister(pattern string)