We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
As discussed in quattor/configuration-modules-core#1413, we often end up with blocks of TT code along the lines of:
[%- IF CCM.is_boolean(pair.value) -%] [% pair.value ? 'yes' : 'no' %] [%- ELSIF CCM.is_list(pair.value) -%] [% pair.value.join(' ') %] [%- ELSE -%] [% pair.value %] [%- END %]
These might be tidier if the type could be used with SWITCH:
SWITCH
[%- SWITCH CCM.type(pair.key) -%] [%- CASE 'boolean' -%] [% pair.value ? 'yes' : 'no' %] [%- CASE 'list' -%] [% pair.value.join(' ') %] [%- CASE -%] [% pair.value %] [%- END %]
The text was updated successfully, but these errors were encountered:
No branches or pull requests
As discussed in quattor/configuration-modules-core#1413, we often end up with blocks of TT code along the lines of:
These might be tidier if the type could be used with
SWITCH
:The text was updated successfully, but these errors were encountered: