Contains the implementation of the Config interface.
(cfg, parent Config)
| 26 | |
| 27 | // Contains the implementation of the Config interface. |
| 28 | func configureConfig(cfg, parent Config) Config { |
| 29 | if cfg == nil { |
| 30 | cfg = &config{ |
| 31 | config: make(map[ConfigKey]ConfigValue), |
| 32 | } |
| 33 | } |
| 34 | |
| 35 | if parent != nil { |
| 36 | // Note: implementation dependent |
| 37 | //nolint:forcetypeassert |
| 38 | cfg.(*config).adopt(parent) |
| 39 | } |
| 40 | |
| 41 | return cfg |
| 42 | } |
| 43 | |
| 44 | type config struct { |
| 45 | config map[ConfigKey]ConfigValue |