Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Selectors ¶
Selectors stores selector key-value pairs where values are stored in inner maps Multiple values for the same key use OR logic (match any value in the inner map) Each value can be represented exactly once per key
func (*Selectors) GetValue ¶
GetValue returns true if the given value exists in the inner map for the given key. Returns false if the key doesn't exist or the value is not present.
func (*Selectors) MatchesIncludes ¶
func (includes *Selectors) MatchesIncludes(frontmatter markdown.BaseFrontMatter) (bool, string)
MatchesIncludes returns whether the frontmatter matches all include selectors, along with a human-readable reason explaining the result. If a key doesn't exist in frontmatter, it's allowed. Multiple values for the same key use OR logic (matches if frontmatter value is in the inner map). This enables combining CLI selectors (-s flag) with task frontmatter selectors: both are added to the same Selectors map, creating an OR condition for rules to match.
Returns:
- bool: true if all selectors match, false otherwise
- string: reason explaining why (matched selectors or mismatch details)