// Handle returns an option that configures a Handler to handle a specific event type.
// If the specified Handler is nil then any currently registered Handler for the given
// event type is deleted upon application of the returned Option.
Handle returns an option that configures a Handler to handle a specific event type.
If the specified Handler is nil then any currently registered Handler for the given
event type is deleted upon application of the returned Option.
// Handle returns an option that configures a Handler to handle a specific event type . // If the specified Handler is nil then any currently registered Handler for the given // event type is deleted upon application of the returned Option .
func Handle(et executor.Event_Type, eh Handler) Option {
	return func(m *Mux) Option {
		old := m.handlers[et]
		if eh == nil {
			delete(m.handlers, et)
		} else {
			m.handlers[et] = eh
		}
		return Handle(et, old)
	}
}
func Handle ( et executor . Event_Type , eh Handler ) Option { return func ( m * Mux ) Option { old := m . handlers [ et ] if eh == nil { delete ( m . handlers , et ) } else { m . handlers [ et ] = eh } return Handle ( et , old ) } }
Handle returns an option that configures a Handler to handle a specific event type.
Handle returns an option that configures a Handler to handle a specific event type .