code: func New(rootDefs []*core.Root) (*TrustStore, error) {
  	var err error
  
  	var store = &TrustStore{}
  	var roots []*x509.Certificate
  
  	if len(rootDefs) == 0 {
  		roots, err = system.New(nil)
  		if err != nil {
  			return nil, err
  		}
  
  		store.addCerts(roots)
  		return store, nil
  	}
  
  	err = errors.New("transport: no supported root providers found")
  	for _, root := range rootDefs {
  		pfn, ok := Providers[root.Type]
  		if ok {
  			roots, err = pfn(root.Metadata)
  			if err != nil {
  				break
  			}
  
  			store.addCerts(roots)
  		}
  	}
  
  	if err != nil {
  		store = nil
  	}
  	return store, err
  }
docs: // New produces a new trusted root provider from a collection of
  // roots. If there are no roots, the system roots will be used.