MCPcopy
hub / github.com/freedomofdevelopers/fod / load

Function load

fodcmd/main.go:35–48  ·  view source on GitHub ↗
(path string)

Source from the content-addressed store, hash-verified

33}
34
35func load(path string) ([]string, error) {
36 f, err := os.Open(path)
37 if err != nil {
38 return nil, err
39 }
40 defer f.Close()
41
42 var domains []string
43 sc := bufio.NewScanner(f)
44 for sc.Scan() {
45 domains = append(domains, sc.Text())
46 }
47 return domains, sc.Err()
48}
49
50func execute(p string, fn func(io.Writer, ...string) error, domains ...string) error {
51 if p != "" {

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected