(dir string, paths []string)
| 9 | ) |
| 10 | |
| 11 | func readFiles(dir string, paths []string) ([]*pb.File, error) { |
| 12 | files, err := sqlpath.Glob(paths) |
| 13 | if err != nil { |
| 14 | return nil, err |
| 15 | } |
| 16 | var out []*pb.File |
| 17 | for _, file := range files { |
| 18 | f, err := readFile(dir, file) |
| 19 | if err != nil { |
| 20 | return nil, err |
| 21 | } |
| 22 | out = append(out, f) |
| 23 | } |
| 24 | return out, nil |
| 25 | } |
| 26 | |
| 27 | func readFile(dir string, path string) (*pb.File, error) { |
| 28 | rel, err := filepath.Rel(dir, path) |
no test coverage detected
searching dependent graphs…