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:
parent
a0949e719f
commit
ff38db6596
21 changed files with 413 additions and 309 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue