code: func New(net inet.Network, opts ...interface{}) *BasicHost {
  	hostopts := &HostOpts{}
  
  	for _, o := range opts {
  		switch o := o.(type) {
  		case Option:
  			switch o {
  			case NATPortMap:
  				hostopts.NATManager = NewNATManager
  			}
  		case AddrsFactory:
  			hostopts.AddrsFactory = AddrsFactory(o)
  		case ifconnmgr.ConnManager:
  			hostopts.ConnManager = o
  		case *madns.Resolver:
  			hostopts.MultiaddrResolver = o
  		}
  	}
  
  	h, err := NewHost(context.Background(), net, hostopts)
  	if err != nil {
  		// this cannot happen with legacy options
  		// plus we want to keep the (deprecated) legacy interface unchanged
  		panic(err)
  	}
  
  	return h
  }
docs: // New constructs and sets up a new *BasicHost with given Network and options.
  // The following options can be passed:
  // * NATPortMap
  // * AddrsFactory
  // * ifconnmgr.ConnManager
  // * madns.Resolver
  //
  // This function is deprecated in favor of NewHost and HostOpts.