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

Added is_type function #3391

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

victormlg
Copy link
Contributor

@victormlg victormlg commented Feb 6, 2025

Merge together:
cfengine/core#5691
#3391

Ticket: CFE-3641
Signed-off-by: Victor Moene <[email protected]>
@victormlg victormlg force-pushed the new-istype-function branch from 5659a0f to f614a99 Compare February 6, 2025 14:31
@olehermanse
Copy link
Member

@cf-bottom jenkins, please


[%CFEngine_function_attributes(var, type)%]

This function works by comparing the type description of `var` with the string `type`. The function
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
This function works by comparing the type description of `var` with the string `type`. The function
This function compares the type description of `var` with the string `type`. The function

This function works by comparing the type description of `var` with the string `type`. The function
expects a variable identifier as the first argument `var` and a type string as
the second argument `type`. The type accepts both the type and an optional subtype. The function
by default evaluates to false if the variable or the type string are wrong.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
by default evaluates to false if the variable or the type string are wrong.
evaluates to false by default if the variable or the type string is wrong.

the second argument `type`. The type accepts both the type and an optional subtype. The function
by default evaluates to false if the variable or the type string are wrong.

To see the possible data types and theit subtypes, see `type()`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
To see the possible data types and theit subtypes, see `type()`
To see the possible data types and their subtypes, see `type()`

[%CFEngine_function_attributes(var, type)%]

This function works by comparing the type description of `var` with the string `type`. The function
expects a variable identifier as the first argument `var` and a type string as
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
expects a variable identifier as the first argument `var` and a type string as
expects a variable identifier as the first argument and a type string as


This function works by comparing the type description of `var` with the string `type`. The function
expects a variable identifier as the first argument `var` and a type string as
the second argument `type`. The type accepts both the type and an optional subtype. The function
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
the second argument `type`. The type accepts both the type and an optional subtype. The function
the second argument. The type accepts both the type and an optional subtype. The function

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

Successfully merging this pull request may close these issues.

4 participants