Big Refactor (#2)

Refactor Everything.

Co-authored-by: Anna Rose Wiggins <annabunches@gmail.com>
Co-committed-by: Anna Rose Wiggins <annabunches@gmail.com>
This commit is contained in:
Anna Rose Wiggins 2025-07-08 03:26:24 +00:00 committed by Anna Rose
parent a0949e719f
commit ff38db6596
21 changed files with 413 additions and 309 deletions

View file

@ -7,6 +7,20 @@ type MappingRuleBase struct {
Modes []string
}
func NewMappingRuleBase(
name string,
modes []string,
) MappingRuleBase {
if len(modes) == 0 {
modes = []string{"*"}
}
return MappingRuleBase{
Name: name,
Modes: modes,
}
}
func (rule *MappingRuleBase) modeCheck(mode *string) bool {
if rule.Modes[0] == "*" {
return true