// InternalValidate should be called to validate the structure
// of the provider.
//
// This should be called in a unit test for any provider to verify
// before release that a provider is properly configured for use with
// this library.

InternalValidate should be called to validate the structure
of the provider.

This should be called in a unit test for any provider to verify
before release that a provider is properly configured for use with
this library.
// InternalValidate should be called to validate the structure // of the provider . // // This should be called in a unit test for any provider to verify // before release that a provider is properly configured for use with // this library .
func (p *Provider) InternalValidate() error {
	if p == nil {
		return errors.New("provider is nil")
	}
	var validationErrors error
	sm := schemaMap(p.Schema)
	if err := sm.InternalValidate(sm); err != nil {
		validationErrors = multierror.Append(validationErrors, err)
	}
	for k, _ := range sm {
		if isReservedProviderFieldName(k) {
			return fmt.Errorf("%s is a reserved field name for a provider", k)
		}
	}
	for k, r := range p.ResourcesMap {
		if err := r.InternalValidate(nil, true); err != nil {
			validationErrors = multierror.Append(validationErrors, fmt.Errorf("resource %s: %s", k, err))
		}
	}
	for k, r := range p.DataSourcesMap {
		if err := r.InternalValidate(nil, false); err != nil {
			validationErrors = multierror.Append(validationErrors, fmt.Errorf("data source %s: %s", k, err))
		}
	}
	return validationErrors
}
func ( p * Provider ) InternalValidate ( ) error { if p == nil { return errors . New ( " " ) } var validationErrors error sm := schemaMap ( p . Schema ) if err := sm . InternalValidate ( sm ) ; err != nil { validationErrors = multierror . Append ( validationErrors , err ) } for k , _ := range sm { if isReservedProviderFieldName ( k ) { return fmt . Errorf ( " " , k ) } } for k , r := range p . ResourcesMap { if err := r . InternalValidate ( nil , true ) ; err != nil { validationErrors = multierror . Append ( validationErrors , fmt . Errorf ( " " , k , err ) ) } } for k , r := range p . DataSourcesMap { if err := r . InternalValidate ( nil , false ) ; err != nil { validationErrors = multierror . Append ( validationErrors , fmt . Errorf ( " " , k , err ) ) } } return validationErrors }
InternalValidate should be called to validate the structure
of the provider.
InternalValidate should be called to validate the structure of the provider .
// Provider-specific checks
