MCPcopy Create free account
hub / github.com/cel-expr/cel-go / SetConfig

Method SetConfig

common/env/env.go:720–723  ·  view source on GitHub ↗

SetConfig sets the set of map key-value pairs associated with this validator's configuration.

(config map[string]any)

Source from the content-addressed store, hash-verified

718
719// SetConfig sets the set of map key-value pairs associated with this validator's configuration.
720func (v *Validator) SetConfig(config map[string]any) *Validator {
721 v.Config = config
722 return v
723}
724
725// ConfigValue retrieves the value associated with the config key name, if one exists.
726func (v *Validator) ConfigValue(name string) (any, bool) {

Callers 12

envToValidatorsFunction · 0.95
ToConfigMethod · 0.80
ToConfigMethod · 0.80
ToConfigMethod · 0.80
TestEnvToConfigFunction · 0.80
TestEnvFromConfigFunction · 0.80
TestEnvFromConfigErrorsFunction · 0.80
ToConfigMethod · 0.80
TestStrictDecodingJSONFunction · 0.80
TestConfigFunction · 0.80
TestValidatorConfigValueFunction · 0.80

Calls

no outgoing calls

Tested by 8

TestEnvToConfigFunction · 0.64
TestEnvFromConfigFunction · 0.64
TestEnvFromConfigErrorsFunction · 0.64
ToConfigMethod · 0.64
TestStrictDecodingJSONFunction · 0.64
TestConfigFunction · 0.64
TestValidatorConfigValueFunction · 0.64