MCPcopy Create free account
hub / github.com/z7zmey/php-parser / processPath

Function processPath

main.go:87–103  ·  view source on GitHub ↗
(pathList []string, fileCh chan<- *file)

Source from the content-addressed store, hash-verified

85}
86
87func processPath(pathList []string, fileCh chan<- *file) {
88 for _, path := range pathList {
89 real, err := realpath.Realpath(path)
90 checkErr(err)
91
92 err = filepath.Walk(real, func(path string, f os.FileInfo, err error) error {
93 if !f.IsDir() && filepath.Ext(path) == ".php" {
94 wg.Add(1)
95 content, err := ioutil.ReadFile(path)
96 checkErr(err)
97 fileCh <- &file{path, content}
98 }
99 return nil
100 })
101 checkErr(err)
102 }
103}
104
105func parserWorker(fileCh <-chan *file, r chan<- result) {
106 for {

Callers 1

mainFunction · 0.85

Calls 2

checkErrFunction · 0.85
WalkMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…