Skip to content

Config optional value support#8

Merged
sni merged 4 commits intomasterfrom
config-optional-value-support
Jan 26, 2026
Merged

Config optional value support#8
sni merged 4 commits intomasterfrom
config-optional-value-support

Conversation

@inqrphl
Copy link

@inqrphl inqrphl commented Jan 23, 2026

the gcfg parser populates the fields with default values for that type, if that field is not present in the read config file. the config_helper was only checking if that field exists within that object instance, so it was always "finding" it, either with the set value inside the config file or the default value if it was not set in the config file

switch to using pointer types in config instead. the pointer types are default initialized to nil, so it can at least determine if something is explicitly set or unset. write that into a function, and use it on config_helper.getConfigValueByPath

the default enablement values for: livestatus, nagios spoolfile, and nagflux spoolfile are all true

Ahmet Oeztuerk added 4 commits January 23, 2026 16:02
the gcfg parser populates the fields with default values for that type,
if that field is not present in the read config file. the config_helper
was only checking if that field exists within that object instance, so
it was always "finding" it, either with the set value inside the config
file or the default value if it was not set in the config file

switch to using pointer types in config instead. the pointer types are
default initialized to nil, so it can at least determine if something is
explicitly set or unset. write that into a function, and use it on
config_helper.getConfigValueByPath
@sni sni merged commit e59c46b into master Jan 26, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants