ConfigValue retrieves the value associated with the config key name, if one exists.
(name string)
| 722 | |
| 723 | // ConfigValue retrieves the value associated with the config key name, if one exists. |
| 724 | func (v *Validator) ConfigValue(name string) (any, bool) { |
| 725 | if v == nil { |
| 726 | return nil, false |
| 727 | } |
| 728 | value, found := v.Config[name] |
| 729 | return value, found |
| 730 | } |
| 731 | |
| 732 | // NewFeature creates a new feature flag with a boolean enablement flag. |
| 733 | func NewFeature(name string, enabled bool) *Feature { |
no outgoing calls