code: func (r *Registry) Register(name string, f ClientFactory) {
  	r.lock.Lock()
  	defer r.lock.Unlock()
  
  	if _, ok := r.protocols[name]; ok {
  		panic(fmt.Errorf("streamclient: protocol already registered for [%s]", name))
  	}
  	if r.protocols == nil {
  		r.protocols = make(map[string]ClientFactory)
  	}
  	r.protocols[name] = f
  }
docs: // Register registers a new protocol and its ClientFactory.
  //
  // This can be invoked by calling NewClient with a path spec referencing that
  // protocol.