(word string, dictNames []string)
| 608 | } |
| 609 | |
| 610 | func LoadWordlist(word string, dictNames []string) ([]string, error) { |
| 611 | if wl, ok := wordlistCache[word+strings.Join(dictNames, ",")]; ok { |
| 612 | return wl, nil |
| 613 | } |
| 614 | dicts, err := loadDictionaries(dictNames) |
| 615 | if err != nil { |
| 616 | return nil, err |
| 617 | } |
| 618 | wl, err := mask.Run(word, dicts, nil) |
| 619 | if err != nil { |
| 620 | return nil, err |
| 621 | } |
| 622 | wordlistCache[word] = wl |
| 623 | return wl, nil |
| 624 | } |
| 625 | |
| 626 | func LoadRuleWithFiles(ruleFiles []string, filter string) ([]rule.Expression, error) { |
| 627 | if rules, ok := ruleCache[strings.Join(ruleFiles, ",")]; ok { |
no test coverage detected