MCPcopy Create free account
hub / github.com/DoNewsCode/core / WithValidators

Function WithValidators

config/config.go:68–72  ·  view source on GitHub ↗

WithValidators changes the validators of Koanf.

(validators ...Validator)

Source from the content-addressed store, hash-verified

66
67// WithValidators changes the validators of Koanf.
68func WithValidators(validators ...Validator) Option {
69 return func(option *KoanfAdapter) {
70 option.validators = validators
71 }
72}
73
74// NewConfig creates a new *KoanfAdapter.
75func NewConfig(options ...Option) (*KoanfAdapter, error) {

Callers 1

TestKoanfAdapter_ReloadFunction · 0.85

Calls

no outgoing calls

Tested by 1

TestKoanfAdapter_ReloadFunction · 0.68