mirror of
https://github.com/optim-enterprises-bv/vault.git
synced 2025-11-01 11:08:10 +00:00
Remove unused and redundant call to validate options (#26533)
This commit is contained in:
@@ -163,11 +163,6 @@ func newFormatterConfig(headerFormatter HeaderFormatter, config map[string]strin
|
|||||||
opt = append(opt, WithPrefix(prefix))
|
opt = append(opt, WithPrefix(prefix))
|
||||||
}
|
}
|
||||||
|
|
||||||
err := ValidateOptions()
|
|
||||||
if err != nil {
|
|
||||||
return formatterConfig{}, err
|
|
||||||
}
|
|
||||||
|
|
||||||
opts, err := getOpts(opt...)
|
opts, err := getOpts(opt...)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return formatterConfig{}, err
|
return formatterConfig{}, err
|
||||||
|
|||||||
@@ -50,13 +50,6 @@ func getOpts(opt ...Option) (options, error) {
|
|||||||
return opts, nil
|
return opts, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// ValidateOptions can be used to validate options before they are required.
|
|
||||||
func ValidateOptions(opt ...Option) error {
|
|
||||||
_, err := getOpts(opt...)
|
|
||||||
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithID provides an optional ID.
|
// WithID provides an optional ID.
|
||||||
func WithID(id string) Option {
|
func WithID(id string) Option {
|
||||||
return func(o *options) error {
|
return func(o *options) error {
|
||||||
|
|||||||
Reference in New Issue
Block a user