code: func (mux *TypeMux) Subscribe(types ...interface{}) *TypeMuxSubscription {
  	sub := newsub(mux)
  	mux.mutex.Lock()
  	defer mux.mutex.Unlock()
  	if mux.stopped {
  		// set the status to closed so that calling Unsubscribe after this
  		// call will short circuit.
  		sub.closed = true
  		close(sub.postC)
  	} else {
  		if mux.subm == nil {
  			mux.subm = make(map[reflect.Type][]*TypeMuxSubscription)
  		}
  		for _, t := range types {
  			rtyp := reflect.TypeOf(t)
  			oldsubs := mux.subm[rtyp]
  			if find(oldsubs, sub) != -1 {
  				panic(fmt.Sprintf("event: duplicate type %s in Subscribe", rtyp))
  			}
  			subs := make([]*TypeMuxSubscription, len(oldsubs)+1)
  			copy(subs, oldsubs)
  			subs[len(oldsubs)] = sub
  			mux.subm[rtyp] = subs
  		}
  	}
  	return sub
  }
docs: // Subscribe creates a subscription for events of the given types. The
  // subscription's channel is closed when it is unsubscribed
  // or the mux is closed.