Closed mattjoyce closed 1 week ago
Hi, thank you for the PR.
Please 1) move the impl. from chatter to in Patterns struct 2) implement variable replacement
@eugeis , you want me to move the new code, and the existing pattern code in chatter.go to pattern.go?
I did implement variable substitution in the new code, line 93 in the pattern.go commit. I think I understand though, we can do variable substitution once. yes?
@eugeis , I have refactored as you asked, but you merged too quickly! :) I have added the new changed to new PR. #1147
What this Pull Request (PR) does
Add file-based pattern support
This PR adds the ability to load patterns directly from files using explicit path prefixes, making it easier to test and iterate on patterns without requiring installation into the fabric config structure.
Why
Currently, to test a pattern it needs to be instantiated in the fabric config file structure. This change allows for quicker testing and iteration of patterns directly from files.
What
./pattern.txt
,../pattern.txt
)~/patterns/test.txt
)/path/to/pattern.txt
)How
Use explicit path prefixes to distinguish file paths from pattern names: