concurrently build config

This commit is contained in:
Denis Mishin 2023-11-01 20:26:09 -04:00
parent e85611b7d0
commit 6dea25e0a2
5 changed files with 158 additions and 99 deletions

View file

@ -300,8 +300,6 @@ type Options struct {
AuditKey *PublicKeyEncryptionKeyOptions `mapstructure:"audit_key"`
BrandingOptions httputil.BrandingOptions
DisableValidation bool
}
type certificateFilePair struct {
@ -462,7 +460,7 @@ func (o *Options) parsePolicy() error {
}
}
for i := range o.AdditionalPolicies {
p := &o.AdditionalPolicies[i]
p := o.AdditionalPolicies[i]
if err := p.Validate(); err != nil {
return err
}
@ -579,10 +577,6 @@ func bindEnvsRecursive(t reflect.Type, v *viper.Viper, keyPrefix, envPrefix stri
// Validate ensures the Options fields are valid, and hydrated.
func (o *Options) Validate() error {
if o.DisableValidation {
return nil
}
ctx := context.TODO()
if !IsValidService(o.Services) {
return fmt.Errorf("config: %s is an invalid service type", o.Services)