Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for multi-line settings #541

Open
webcompas opened this issue Jun 17, 2024 · 0 comments
Open

Add support for multi-line settings #541

webcompas opened this issue Jun 17, 2024 · 0 comments

Comments

@webcompas
Copy link

Use Case

There are Ini-style config files which contain settings with multiple values. They are provided in a Heredoc style like in the following example excerpt of snmptt.ini:

snmptt_conf_files = <<END
/etc/snmp/snmptt.conf
/etc/snmp/snmptt.conf.vendor1
/etc/snmp/snmptt.conf.vendor2
END

Unfortunately managing such a setting is not yet supported.

Proposed solution

I'd like to get such multi-line settings supported. The delimiter to use (e.g. "END") should be customizable by a corresponding parameter. The solution could either make use of additional parameters to ini_setting or introduce a new type ( for example ini_setting_multiline).

Considered alternatives

Just serving the whole file is not suitable in my use case. I also tried to solve it using Augeas but there's no corresponding lens available.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants