code: func ResourceProviderResolverFixed(factories map[string]ResourceProviderFactory) ResourceProviderResolver {
  	return ResourceProviderResolverFunc(func(reqd discovery.PluginRequirements) (map[string]ResourceProviderFactory, []error) {
  		ret := make(map[string]ResourceProviderFactory, len(reqd))
  		var errs []error
  		for name := range reqd {
  			if factory, exists := factories[name]; exists {
  				ret[name] = factory
  			} else {
  				errs = append(errs, fmt.Errorf("provider %q is not available", name))
  			}
  		}
  		return ret, errs
  	})
  }
docs: // ResourceProviderResolverFixed returns a ResourceProviderResolver that
  // has a fixed set of provider factories provided by the caller. The returned
  // resolver ignores version constraints entirely and just returns the given
  // factory for each requested provider name.
  //
  // This function is primarily used in tests, to provide mock providers or
  // in-process providers under test.