MCPcopy Create free account
hub / github.com/chainreactors/spray / loadFileWithCache

Function loadFileWithCache

pkg/utils.go:586–596  ·  view source on GitHub ↗
(filename string)

Source from the content-addressed store, hash-verified

584}
585
586func loadFileWithCache(filename string) ([]string, error) {
587 if dict, ok := Dicts[filename]; ok {
588 return dict, nil
589 }
590 dict, err := LoadFileToSlice(filename)
591 if err != nil {
592 return nil, err
593 }
594 Dicts[filename] = dict
595 return dict, nil
596}
597
598func loadDictionaries(filenames []string) ([][]string, error) {
599 dicts := make([][]string, len(filenames))

Callers 1

loadDictionariesFunction · 0.85

Calls 1

LoadFileToSliceFunction · 0.85

Tested by

no test coverage detected